Bold, emphasis, and text formatting
In this lesson
- strong vs b, em vs i
- Highlighting with mark and side notes with small
- sup, sub, code, and abbr
- Quotes with blockquote and q, and HTML entities
Short answer
Use <strong> for important text and <em> for stressed emphasis. Both carry meaning that screen readers and search engines can notice. <b> and <i> only change the look, so save them for things like product names or foreign words. Other inline tags handle highlights, fine print, code, quotes, and special characters.
strong vs b, em vs i
| Tag | Meaning | Example use |
|---|---|---|
| <strong> | Strong importance | Warning: the road is closed. |
| <em> | Stress emphasis | I said Tuesday, not Thursday. |
| <b> | Draw attention, no extra importance | Product names in a review |
| <i> | Alternate voice | Foreign words like pasalubong |
Both pairs look the same by default, bold and italic. The difference is meaning, which is the heart of semantic HTML.
Other inline formatting
<p><mark>Sale ends Sunday</mark></p>
<p><small>Prices include VAT.</small></p>
<p>Water is H<sub>2</sub>O. Area is 25 m<sup>2</sup>.</p>
<p>Type <code>Ctrl + S</code> to save.</p>
<p><abbr title="Department of Trade and Industry">DTI</abbr> registered.</p>
<p>Was <del>₱500</del> now <ins>₱399</ins>.</p>
Quotes
<blockquote cite="https://example.com/review">
<p>Best pili tarts in Albay!</p>
</blockquote>
<p>She said, <q>See you at the plaza.</q></p>
<blockquote> is for longer quotes in their own block, like a customer testimonial. <q> adds quotation marks around a short quote inside a sentence.
HTML entities
Some characters have special meaning in HTML. To show them as text, use entities:
| Character | Entity |
|---|---|
| < | < |
| > | > |
| & | & |
| © | © |
| non-breaking space | |
With UTF-8 you can type ₱ and ñ directly, so you only need entities for the first three and for nbsp.
Try it: format a promo
Make the deadline strong, highlight the discount with mark, strike the old price with del, and put the fine print in small.
Live preview
Quick quiz
Common mistakes
- Bolding everything. If everything is strong, nothing stands out.
- Using em just for italics. Use em only when stress changes the meaning.
- Using u for emphasis. Underlined text looks like a link. Avoid it.
Your action
Tick each item when you can do it. Your progress saves on this device.
Key terms
- <strong>
- Text with strong importance.
- <em>
- Text with stress emphasis.
- <mark>
- Highlighted text.
- <blockquote>
- A block quotation from another source.
- HTML entity
- A code like < that displays a reserved character.
- Inline element
- An element that sits inside a line of text, like strong or a.
Questions beginners ask
Does strong help SEO?
Barely. Use it for readers, not for ranking.
Is <b> deprecated?
No. It is valid in modern HTML with a narrower meaning.
How do I show HTML code on a page?
Wrap it in <code> or <pre><code> and escape < as <.
Related lessons
Need a website built or fixed while you practice? The team at Remar Digital can help.