HTML contains defined elements for defining how text is formatted. HTML Formatting of text borrows from the traditional Word Processing tools.
HTML Formatting Elements
Here is a summary of HTML text formatting elements.
-
<b>
โ Bold text -
<strong>
โ Important text -
<i>
โ Italic text -
<em>
โ Emphasized text -
<u>
โ Underlined text -
<mark>
โ Marked text -
<small>
โ Smaller text -
<del>
โ Deleted text -
<ins>
โ Inserted text -
<s>
โ No longer valid text -
<sub>
โ Subscript text -
<sup>
โ Superscript text
Bold Text
The HTML <b>
element defines the bold text, without any extra importance.
The HTML <strong>
element defines text with strong importance. Visually it is typically displayed in bold.
Italic Text
The HTML <i>
element defines text in an alternate voice or mood. Visually it is typically displayed in italic.
The HTML <em>
element defines emphasized text and is typically displayed in italic.
Underlined Text
The HTML <u>
element defines some text that is unarticulated and typically displayed underlined.
Smaller Text
The HTML <small>
element defines the text that is one font size smaller than the surrounding text.
Marked or Highlighted text
The HTML <mark>
element defines the text that should be marked or highlighted.
Deleted Text
The HTML <del>
element defines the text that has been deleted from a document. Visually it is typically displayed with crossed-out text.
Inserted Text
The HTML <ins>
element defines a text that has been inserted into a document. Major Web browsers will typically underline inserted text.
No Longer Valid Text.
The HTML <s>
element defines the text that is no longer valid in the specified context.
Subscript Text
The HTML <sub>
element defines subscript text. Subscript is the text that appears half a character below the normal line and is sometimes rendered in a smaller font. Subscript is ideal for formatting chemical formulas such as CO2.
Superscript Text
The HTML <sup>
element defines superscript text. Superscript is the text that appears half a character above the normal line and is sometimes rendered in a smaller font. Superscript can be useful in scientific formulas such as 92.
Check out the complete list of all available HTML tags in our HTML Tag Reference.