HTML Text Formatting
HTML contains several elements for defining text with a special meaning.
Example
This text is bold
This text is italic
This is subscript and superscript
HTML Formatting Elements
Formatting elements were designed to display special types of text:
Tag | Description |
---|---|
<b> | Makes the text darker (bold) |
<i> | Makes the text Italics |
<u> | Underlines the text |
<code> | Defines the text as code |
<tt> | Defines typewriter text |
<small> | Defines the text smaller |
<em> | Emphasis a text, may be italicized depending on the browser |
<strong> | Emphasis a text, may be bolded depending on the browser |
<sub> | Defines subscripted text |
<sup> | Defines superscripted text |
<q> | Enuotes a text |
<s> or <del> | Strike through |
<mark> | Defines marked/highlighted text |
Example
<b>This text is bold</b><br> <i>This text is italic</i><br> <u>This text is underlined</u><br> <code>This text looks like code</code><br> <tt>This text is typewriter text</tt><br> <small>This is some smaller text.</small><br> <em>This text is emphasized</em><br> <strong>This text is important!</strong><br> <p>This is <sub>subscripted</sub> text.</p> <p>This is <sup>superscripted</sup> text.</p> <q>This is a enquoted text</q> <p>My favorite color is <s>blue</s> red.</p> <p>Do not forget to buy <mark>milk</mark> today.</p>