Back to HTML

Bold and Italic in HTML: strong, em, b and i

Coding Tutorials Team 22 July 2026

Four elements exist to emphasise text, and they produce only two visual outcomes. Strong and b both render bold. Em and i both render italic. The natural conclusion is that half of them are redundant leftovers, and that is not what happened. They were redefined, and the difference between each pair is meaning rather than appearance.

Strong indicates importance

The strong element marks text with strong importance, seriousness or urgency. It is the right choice for a warning, a critical instruction, or a word whose omission would change how seriously a sentence should be taken.

<p><strong>Do not run this command on a production database.</strong></p>

Screen readers may reflect this through a change in vocal delivery, though support varies considerably between products. The more dependable benefit is that the importance is recorded in the document rather than existing only as a visual property that some users never perceive.

B draws attention without adding importance

The b element marks text that should be stylistically distinct from its surroundings without being more important. The specification gives keywords in a summary, product names in a review, and the opening words of an article as examples.

<p>We tested the <b>Mercury X40</b> against three rivals.</p>

Nothing about that product name is urgent. It is bold because it helps someone scanning the page find the subject quickly, which is exactly the distinction being drawn.

Em marks stress emphasis

Emphasis in the em element means the linguistic kind, where stressing a different word changes what a sentence means.

<p>I said <em>you</em> should close the tag.</p>

Move the emphasis to a different word and the implication changes entirely. That is the test for em: if shifting the stress would alter the meaning of the sentence, em is correct. Nesting it increases the degree of emphasis, though this is rare in practice.

I marks text that is set apart for another reason

The i element covers italicised text that is not stress emphasis: a technical term on first use, a phrase in another language, a taxonomic name, a thought, or the name of a ship or publication.

<p>The condition is called <i>presbyopia</i>.</p> <p>A certain <i lang="fr">je ne sais quoi</i>.</p>

Adding a lang attribute to a foreign phrase is worth doing, since it lets a screen reader switch pronunciation rules rather than reading French as mangled English.

Which to reach for

A practical heuristic covers nearly every case. Ask whether you want the reader to register that this matters, or whether you simply want the text to look different from its neighbours. The first is strong or em, the second is b or i.

Where the answer is genuinely unclear, strong and em are the safer defaults, because claiming slightly more importance than intended is a smaller error than discarding meaning that some readers depend on.

Do not use any of them for styling

All four carry meaning, which makes them the wrong tool when you want bold text for purely visual reasons such as a stylised heading or a pull quote. That job belongs to CSS applied to whichever element is structurally correct.

.pull-quote { font-weight: 700; font-style: italic; }

The rule of thumb is that if a redesign could reasonably remove the bolding without changing what the sentence means, the bolding was presentational and belongs in the stylesheet.

Marking highlighted and relevant text

A fifth element is often what people actually want. The mark element indicates text highlighted for reference in the current context, and it renders with a yellow background by default. Search result pages use it to show which words matched a query, and quoted passages use it to draw attention to the part being discussed. Unlike bold or italic, it says nothing about the importance of the text itself, only that it is relevant right now to whatever the reader is doing.

<p>Results for <mark>specificity</mark> in this article.</p>

Because the meaning is contextual rather than intrinsic, the same words might be marked on one page and not on another, which is a useful way to understand where it differs from the four elements above.

The elements that really were removed

Some genuinely obsolete relatives remain in old code. The font element, the centre element and the big element were removed because they described appearance exclusively and CSS replaced them entirely. Strike-through survives in a different form, since the s element now means content that is no longer accurate and the del element means content that was removed, both of which are meaningful rather than merely decorative.

Consistency across a site

Whichever conventions you settle on, write them down. A site where product names are sometimes b and sometimes strong is harder to restyle, because there is no single rule that targets the right thing. Deciding once, at the start, that product names use b and warnings use strong makes both the markup and the stylesheet predictable.