Basic HTML

Basic HTML

Hyper Text Markup Language (HTML) is the coding language used in many Content types. Editing the HTML of a Block is another way to alter the formatting of a page.

Open the source to see the HTML code

  1.  From the administration bar, select Workbench, then select My Dashboard.

  2. In the Content list panel, select the content you would like to use basic hypertext markup on.

  3. Select the Layout tab.

  4. Select + Add section if applicable, then select + Add block.

  5. Under Content, select Copy text.

    Screenshot of copy text option
  6. To edit existing Copy text, select the pencil icon in the top right corner of the Copy text block, then select "Configure".

    Screenshot of configure button
  7. In the editing toolbar, select Source.

    screenshot of source icon
  8. The source with the HTML code will replace the What You See Is What You Get (WYSIWYG) editor.

Format text

Place a <b> tag before the text that is to be bolded, and a </b> tag after the text.

  • Note: <b> is interchangeable with <strong>. After saving the text, <b> will be replaced with <strong>.

Example:

This is my <b>favorite</b> song.

Displays:  

This is my favorite song.

Place an <i> tag before the text that is to be italicized, and a </i> tag after the text.

  • Note: <i> is interchangeable with <em>. After saving the text, <i> will be replaced with <em>.

Example:

I am reading <i>Animal Farm</i> for an essay.

Displays:

I am reading Animal Farm for an essay.

An unordered list is a bulleted list. Use this type of list when the order does not matter.  

  1.  Begin an unordered list with the <ul> tag.   

  2. Start each new point with <li>, then close the line with </li>

  3. Continue doing this until the list is finished.   

  4. When the unordered list is done, end with </ul>.  

Example:

<p>Favorite musicians</p> <ul>          <li>Taylor Swift</li>          <li>J.Cole</li>          <li>Earth, Wind, and Fire</li> </ul>

Displays:

Favorite musicians

  • Taylor Swift

  • J.Cole

  • Earth, Wind, and Fire

An ordered list is a numbered list. Use this when the order matters, for example, steps in a process.

  1. Begin the list with <ol>.

  2. Start each new point with <li>, then close the point with </li>.

  3. Continue doing this until the list is finished.

  4. End the ordered list with </ol>.

Example:

<p>Cha-cha slide</p> <ol>          <li>Slide to the left.</li>          <li>Slide to the right.</li>          <li>Take it back now y'all.</li>          <li>One hop this time.</li>          <li>Right foot let's stomp.</li>          <li>Left foot let's stomp.</li>          <li>Cha cha real smooth.</li> </ol>

Displays: 

Cha-cha slide

  1. Slide to the left.       

  2. Slide to the right.       

  3. Take it back now y'all.       

  4. One hop this time.       

  5. Right foot let's stomp.       

  6. Left foot let's stomp.       

  7. Cha cha real smooth.

A description list is a list of terms, with a description for each term.

  1. Begin the description list with <dl>.

  2. Insert <dt> to list a term, and close it with </dt>.

  3. Insert <dd> to define the term, and close it with </dd>.

  4. Continue doing this until your description list is done.   

  5. End the description list with </dl>.

Example:

<p>Favorite beverages</p> <dl>          <dt>Water</dt>          <dd>Transparent liquid.</dd>          <dt>Tea</dt>          <dd>Prepared by pouring hot or boiling water over cured leaves.</dd>          <dt>Coffee</dt>          <dd>Prepared from roasted coffee beans.</dd> </dl>

Displays:

Favorite beverages

Water   

Transparent liquid.   

Tea   

Prepared by pouring hot or boiling water over cured leaves.       

Coffee   

Prepared from roasted coffee beans.

Lists can also be nested within each other.

  1. Begin creating the desired list type. See Ordered list and/or Description list for in-depth instructions.

  2. Insert the opening and closing tags for each line.

  3. When the nested list starts, begin the desired list with the appropriate tag.   

  4. When the nested list is finished, end the list with the closing tag.

  5. Continue the list.   

  6. End the list with the appropriate closing tag.

Example:

<p>Favorite books</p> <ul>          <li>To Kill a Mockingbird</li>          <li>The Hunger Games Series          <ol>                <li>The Hunger Games</li>                <li>Catching Fire</li>                <li>Mockingjay</li>          </ol>          </li>          <li>Pride & Prejudice</li> </ul>

Displays: 

Favorite books

  • To Kill a Mockingbird       

  • The Hunger Games Series            

    1. The Hunger Games               

    2. Catching Fire               

    3. Mockingjay                  

  • Pride & Prejudice

Fix problems with HTML

A paragraph tag <p> defines a new paragraph, and </p> is the ending tag. Sometimes a paragraph tag needs to be added to insert a space or deleted to fix spacing.

Adding a paragraph tag to insert a space

When creating or editing Copy text it may be difficult to insert a space in order to add new content between areas. To insert a space:

  1. Open Source in the Copy text Block.

  2. Locate where the space is to be inserted (after the final closing tag for the content on top and before the first opening tag for the bottom content).

  3. Place the cursor after the closing div tag.

  4. Press enter and insert <p>.

  5. Insert the end paragraph tag, </p>, two lines below the beginning tag.

  6. By selecting Source again, the WYSIWYG editor will turn back on, and there will be a space to insert content.

Removing paragraph tags in a list

Sometimes the spacing can be strange in lists because of paragraph tags. To check to see if paragraph tags are the issue:

  1. Open Source in the Copy text Block.

  2. Locate the HTML code with strange spacing.

  3. Remove any unwanted <p> and </p> tags.

  4. Select Add Block or Update.

Non-breaking spaces (&nbsp;) can sometimes show up in the HTML code, usually the result of pasting text in from another program. If you have any strange spacing, check for &nbsp; in the HTML code.

  1. Open Source in the Copy text Block.   

  2. Locate the strange spacing and check for &nbsp;.

  3. Remove any &nbsp;.

  4. Select Add Block or Update.

Alternatively, if there is a lot of strange spacing:

  1. Open Source in the Copy text Block.

  2. Place cursor anywhere and select all (Ctrl+A).

  3. Copy (Ctrl+C) the HTML code.

  4. Open a word processing document (ex. Microsoft Word, Google Docs, etc.).

  5. Paste HTML code (Ctrl+V) into the word processing document.

  6. In the word processing document open the "Find and Replace" tool (Ctrl+H). Insert &nbsp; in "Find what" and leave "Replace with" blank. Select Replace all. All instances of &nbsp; will be deleted.

  7. Select all (Ctrl+A) of the updated HTML code.

  8. Copy (Ctrl+C) the updated HTML code.

  9. Paste (Ctrl+V) the updated HTML code back into the site in the Source panel of the desired Copy text Block.

    1. Note: When copying and pasting content from a Word document, a window stating “The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?” will appear. Choose Ok so that the copied text is stripped of any formatting that may interfere with web content functionality.

  10. Select Add Block or Update.