HTML CSS JavaScript SEO Python Posts Privacy About Contact

HTML Formatting

HTML contains several elements for defining text with a special meaning.

HTML Text Formatting

HTML has many elements for defining text with special meanings. Formatting elements were designed to display special types of text.

Try It — All Formatting Elements

Preview

What Each Tag Does

TagMeaningOutput
<b>Bold (no extra importance)bold
<strong>Bold + semantically importantimportant
<i>Italic (alternate voice)italic
<em>Italic + emphasizedemphasized
<mark>Highlighted texthighlighted
<small>Smaller than surrounding textsmaller
<del>Strikethrough (deleted)deleted
<ins>Underlined (inserted/added)inserted
<sub>Subscript (lower)H₂O
<sup>Superscript (raised)

Tip: Prefer <strong> over <b> and <em> over <i> — they carry meaningful semantic weight that helps screen readers and search engines.