3 min read · Free · No login needed
HTML has special tags that change how text looks and what it means. The two most used are <strong> for important text (shown bold) and <em> for emphasised text (shown italic).
You may also see <b> and <i>. They look the same on screen — bold and italic — but they carry no meaning. <strong> tells the browser and search engines "this is important". <em> says "stress this word when reading aloud". Screen readers for blind users actually change their voice for strong and em, but not for b and i. So use strong and em in your pages.
<small> — smaller text, often used for fine print.<mark> — highlighted text, like a yellow marker pen.<del> — struck-through text (something removed).<ins> — underlined text (something added).<sub> — subscript, like the 2 in H2O.<sup> — superscript, like the 2 in x2.HTML has two kinds of formatting tags. <strong> and <em> add meaning: this text is important, this word is stressed. Screen readers read them with emphasis, and search engines notice them. <b> and <i> only change the look — bold or italic — without adding any meaning. When in doubt, use <strong> and <em>.
| Tag | Value | Description |
|---|---|---|
<b> | text | Bold text, no extra meaning. |
<strong> | text | Important text — shown bold, with meaning. |
<i> | text | Italic text, no extra meaning. |
<em> | text | Emphasised text — shown italic, with meaning. |
<small> | text | Smaller text, for side notes and fine print. |
<mark> | text | Highlighted text, like a marker pen. |
<del> / <ins> | text | Deleted text (struck through) / inserted text (underlined). |
<sub> / <sup> | text | Subscript (H<sub>2</sub>O) / superscript (x<sup>2</sup>). |
Here is how the two kinds differ in practice:
<p>This is <strong>very important</strong> news.</p> <p>Water is H<sub>2</sub>O and x<sup>2</sup> means x squared.</p>
<strong> as bold and <em> as italic by default — but that is only the default look. Their real job is meaning, and CSS can change their appearance any time.<mark> to highlight a search term or a key phrase in a long text. Readers spot it instantly, like a highlighter on paper.<b> for important text — use <strong> so screen readers stress it too.<i> for emphasis — use <em> for the same reason.<p>This is <strong>important</strong> and this is <em>emphasised</em>.</p> — one paragraph shows both meaning tags: <strong> marks the word as important (shown bold), and <em> stresses the word (shown italic).<small> shrinks the "Small print." text, and <mark> highlights "Highlighted text." like a yellow marker pen.<del>₹500</del> strikes through the old price, and <ins>₹399</ins> underlines the new price — so the page shows both the change and the new value.H<sub>2</sub>O drops the 2 below the line for the water formula, and 2<sup>2</sup> raises the 2 above the line for "2 squared".<!DOCTYPE html>
<html>
<head>
<title>Formatting</title>
</head>
<body>
<p>This is <strong>important</strong> and this is <em>emphasised</em>.</p>
<p><small>Small print.</small> <mark>Highlighted text.</mark></p>
<p>Price was <del>₹500</del> <ins>₹399</ins>.</p>
<p>Water is H<sub>2</sub>O and 2<sup>2</sup> = 4.</p>
</body>
</html>
Change the code below and press Run to see the result instantly. No file to save, no login needed.
The questions learners ask most about this lesson — read the question, then open it to see the answer.
Both look bold, but strong adds meaning: this text is important. Screen readers change their voice for strong, but not for b.
Both look italic, but em adds meaning: stress this word when reading aloud. Screen readers stress em, but not i.
The mark tag. It highlights text, like a yellow marker pen, so readers spot a key phrase instantly.
AI can write code for you, but it cannot think for you. When you learn HTML yourself, your brain builds the real skill: you understand why a page looks the way it does, you can fix it when it breaks, and you can answer it in an exam or an interview without help. That is the skill that gets you a job — not a copied answer.
Finish all 35 lessons, pass the test (80%), pay ₹10 and get your certificate.
Take the testPrefer watching? Video courses teach the same topics step by step.
Free tutorials teach you the basics. Our paid courses add live projects, mentorship and a certificate.
Browse all coursesAsk about courses, website & more
Request human callback:
Please log in to download. You will stay on this page after logging in!
New here? Register now →