agyanadda@gmail.com

HTML Text Formatting

HTML Text & Links 1 min read Updated Nov 30, 2026 Topic 7 of 33

HTML has special tags to give text extra meaning, such as importance or emphasis.

Tag Meaning Looks like
<strong> Important text bold
<em> Emphasised text italic
<mark> Highlighted text highlighted
<small> Smaller side note small
<del> Deleted text struck through
<ins> Inserted text underlined
<sub> Subscript H2O
<sup> Superscript x2

strong vs b, em vs i

<b> and <i> only change the look. <strong> and <em> also tell search engines and screen readers that the text is important — so prefer them.

Example

Example — Formatting tags HTML
<p>This is <strong>very important</strong> text.</p>
<p>I <em>really</em> like coding.</p>
<p>Don't forget to <mark>submit the form</mark>.</p>
<p>Price: <del>₹999</del> <ins>₹499</ins></p>
<p>Water is H<sub>2</sub>O and 5<sup>2</sup> = 25.</p>
<p><small>Terms and conditions apply.</small></p>

Test Yourself With Exercises

Exercise 1 Multiple Choice

Which tag marks text as important?

Exercise 2 Fill in the Blank

The chemical formula H2O uses the ___ tag for the 2.

Exercise 3 True / False

<del> shows text with a line through it.

Frequently Asked Questions

Use <strong> when the text is truly important. If you only want a bold look for design, use CSS (font-weight: bold).