Text Formatting Elements


• Used to modify how text is displayed
• Helps add emphasis, meaning, or visual style
• Formatting tags affect appearance only


<b>

Displays text in bold without adding importance.

Syntax:
<b>text</b>

Example:

Bold text


<strong>

Indicates important text, usually displayed bold.

Syntax:
<strong>text</strong>

Example:

Important text


<i>

Displays text in italic.

Syntax:
<i>text</i>

Example:

Italic text


<em>

Emphasizes text (usually italic).

Syntax:
<em>text</em>

Example:

Emphasized text


<u>

Underlines the text.

Syntax:
<u>text</u>

Example:

Underlined text


<mark>

Highlights text with a background color.

Syntax:
<mark>text</mark>

Example:

Highlighted text


<small>

Makes text smaller than normal.

Syntax:
<small>text</small>

Example:

Small text


<del>

Shows deleted/removed text (strikethrough).

Syntax:
<del>text</del>

Example:

Deleted text


<ins>

Shows inserted text (usually underlined).

Syntax:
<ins>text</ins>

Example:

Inserted text


<sub>

Subscript text.

Syntax:
<sub>text</sub>

Example:

H<sub>2</sub>O


<sup>

Superscript text.

Syntax:
<sup>text</sup>

Example:

x<sup>2</sup>

HTML Logo