Format Text in Questions

When typing your Question, Solution, and for some modes also your Answer, you can use HTML tags and CSS style attribute values to add formatting to your questions.

Note Not all HTML tags and CSS attributes are displayed in the same way on all browsers. In addition, some tags or attributes might not display as expected because of other formatting rules in the WebAssign application. Always test your formatting.
Note Do not use <p> tags in your WebAssign questions. Instead, use <br> to add a linebreak. <p> may not display correctly.

If you are not familiar with using HTML, the following information might be useful:

  • HTML is a markup language with tags enclosed in angle brackets <>.
  • Most HTML tags have a start tag that identifies the formatting to be applied and a matching end tag that begins with a forward slash, for example,
    <b>your_content_here</b>
  • When the < and & characters are followed by a letter, you must use a character entity reference to prevent these characters from being interpreted as HTML markup.

    To type <, type &lt;

    To type &, type &amp;

  • Most spaces and line breaks are considered unimportant for HTML formatting and are ignored.
    Important Line breaks in Answer are very important for WebAssign and determine the start of each answer or answer choice, depending on the question mode.

See the following table for examples of some of the most commonly used formatting.

Formatting

Example Code

Display

Bold
<b>bold text</b>
bold text
Italics
<i>italic text</i>
italic text
Underline
<u>underlined text</u>
underlined text
Subscript
text<sub>subscript </sub>
textsubscript
Superscript
text<sup>superscript</sup>
textsuperscript
Line break
line<br>new line

line
new line

New paragraph
paragraph<br><br>new paragraph

paragraph

new paragraph

Indented text
text 
<div class='indent'>indented</div>
Centered text
text 
<div class='center'>centered</div>
Right-aligned text
text 
<div class='right'>right-aligned</div>
Bulleted list
<ul>
<li>first list item</li>
<li>next list item</li>
<li>last list item</li>
</ul>
  • first list item
  • next list item
  • last list item
Numbered list
<ol>
<li>first list item</li>
<li>next list item</li>
<li>last list item</li>
</ol>
  1. first list item
  2. next list item
  3. last list item
Simple table - no borders
<table>
<tr><td>top left</td><td>top right</td></tr>
<tr><td>bottom left</td><td>bottom right</td></tr>
</table>
image of table with no borders. top row: top left, top right. bottom row: bottom left, bottom right
Simple table - with borders
<table border="1">
<tr><td>top left</td><td>top right</td></tr>
<tr><td>bottom left</td><td>bottom right</td></tr>
</table>
image of table with borders. top row: top left, top right. bottom row: bottom left, bottom right