HTML Formatting Tag Summary

Several HTML tags can be wrapped around text to change its appearance. The function of these tags is similar to the formatting buttons in any writing application.

This is some text with a <b>bolded</b> word.

Common Formatting Tags

There are many formatting tags, but here are the most common ones that you are likely to use often.

Bold

There are two tags to make text bolder; <b> (bold) and <strong>. If you wrap text within these tags, the font weight will be set to bold. However, you can control the exact font-weight for each separately using CSS.

This is some text with a <strong>bolded</strong> word.

Italics

There are two tags to make text italic; <i> (italic) and <em> (emphasis). If you wrap text within these tags, the font-style will be set to italic. However, you can control the exact appearance for each separately using CSS.

This is some text with an <i>italicized</i> word.

Mark

The mark tag can be used to highlight text. You can wrap text in this tag and then use CSS to choose a background color.

<mark>This text will be highlighted</mark>

Sub and Sup

The superscript and subscript tags allow you to control the appearance of reference numbers or symbols added to text that appear above or below the other text and often a different size.

These are used for footnotes, source links, exponents, and ordinals.

This is the 1<sup>st</sup> time I've used this tag.

Code Sandbox