HTML provides formatting tags to present text in distinct styles:
<b> – Bold text<strong> – Important text<i> – Italic text<em> – Emphasized text<mark> – Marked text<small> – Smaller text<del> – Deleted text<ins> – Inserted text<sub> – Subscript text<sup> – Superscript textThe <b> tag in HTML is used to make text bold without implying any additional significance.
| <b>This text is bold</b> |
The <strong> element in HTML is utilized to denote text of significant importance, which is commonly rendered in bold.
| <strong>This text is important!</strong> |
The <i> tag in HTML is used to indicate text in a different voice or mood, often displayed in italicized form.
Tip: The <i> tag is frequently used to indicate a technical term, a foreign phrase, a thought, a ship’s name, and similar items.
| <i>This text is italic</i> |
The <em> element in HTML is designed to emphasize text, which is usually presented in an italic style.
Tip: A screen reader will emphasize words within the <em> tag, applying verbal stress.
| <em>This text is emphasized</em> |
The <small> tag in HTML is used to specify text that should appear smaller in size.
| <small>This is some smaller text.</small> |
The <mark> element in HTML is intended for text that needs to be highlighted or marked.
| <p>Do not forget to buy <mark>milk</mark> today.</p> |
The <del> tag in HTML is used to indicate text that has been removed from a document, with browsers typically rendering this text with a line struck through it.
| <p>My favorite color is <del>blue</del> red.</p> |
The <ins> element in HTML denotes text that has been added to a document, and browsers commonly display this text with an underline.
| <p>My favorite color is <del>blue</del> <ins>red</ins>.</p> |
The <sub> tag in HTML is used for subscript text, which is positioned slightly lower than the normal text line and often in a smaller font size. This is particularly useful for notations such as chemical formulas, for example, H2O.
| <p>This is <sub>subscripted</sub> text.</p> |
The <sup> element in HTML is designated for superscript text, which is displayed a bit higher than the regular text line and may be shown in a smaller font size. It’s commonly used for references such as footnotes, exemplified by WWW[1].
| <p>This is <sup>superscripted</sup> text.</p> |