HTML Bold Tag: b vs strong, With Examples
November 11, 2026 · 9 min read
HTML Bold Tag: b vs strong (and i vs em, mark, s)
The html bold tag comes in two forms. Use <strong> for text that carries importance, seriousness or urgency, and <b> for text you want to draw the eye to without adding importance. Both render bold by default, neither is deprecated, and CSS font-weight handles bold that's purely decorative.
How the HTML Bold Tag Works: Syntax and Closing Tags
Both elements wrap the text you want bold. You open with <b> or <strong>, add your text, then close with the same name after a slash, as in </b>.
<p>Read the <b>Getting Started</b> section first.</p>
<p><strong>Warning:</strong> unplug the device before opening it.</p>
Each line renders as a normal paragraph, with "Getting Started" and "Warning:" in bold. The closing </b> marks where the bold run ends. Both are phrasing elements (inline), so they sit inside a paragraph, a list item or a table cell. Their content model allows only phrasing content, so don't wrap a block like <p> or <div> in them.
A forgotten closing tag causes more trouble than you'd expect. The HTML parser keeps an unclosed <b> on its list of active formatting elements. As a result, the bold can spill into the following paragraphs, not just the rest of the current one.
<p>This is <b>bold and never closed.</p>
<p>This whole paragraph is bold too.</p>
When you nest bold with italics, close the tags in reverse order: <b><i>text</i></b>. Browsers repair mis-nested tags, but the repaired result isn't always what you meant.
What Is the Difference Between strong and b?
The difference is meaning, not looks. The HTML Living Standard says <strong> represents "strong importance, seriousness, or urgency" for its contents. It defines <b> as text that draws attention "without conveying any extra importance" and calls it a last resort when no other element fits.
The spec's own examples for <b> are keywords in a document abstract, product names in a review, actionable words in text-driven software, and an article lede. <strong> suits warnings, required steps and the one sentence a reader must not skip. You can find both definitions on the WHATWG text-level semantics page.
So which HTML tag for bold should you pick? Here's the rule we use: delete the bold in your head and reread the sentence. If the meaning or the urgency changes, use <strong>. If it only looks plainer, use <b> or a CSS class.
<p><strong>Do not</strong> run this command on a production database.</p>
<p>The <b>Acme Trail 40</b> backpack weighs 1.2 kg.</p>
In the first line, dropping the bold hides a warning. In the second, it changes nothing but the visual scan, so <b> is the honest choice.
Is the b Tag Deprecated in HTML5?
No. The b tag in HTML has never been deprecated. The HTML 4.01 element index marks <font>, <center>, <strike>, <s> and <u> as deprecated, but <b> and <i> aren't on that list. HTML5 kept both and gave them the meanings described above.
What did become obsolete are the purely presentational tags. The standard's list of obsolete features includes <font>, <center>, <big>, <strike>, <tt>, <blink> and <marquee>. Browsers still display most of them, but a validator flags them, so you shouldn't write them in new pages. Our guide to tags in HTML has a table of what replaced each one.
<s> and <u> went the other way. HTML 4.01 deprecated them, and the current standard brought them back with new semantic meanings.
Do Screen Readers Announce strong and em?
Usually not, and that's the limitation most tutorials skip. Screen readers read the words but typically don't change voice for <strong> or <em> with default settings. NVDA, for example, has an Emphasis option in its Document Formatting settings, and it ships turned off.
So the semantic tag doesn't guarantee that a listener hears the importance. It records the meaning in the markup, where your CSS and other software can use it, but the words themselves must carry the message.
For anything critical, put the signal in the text. Write "Warning:" or "Required:" as a visible label, then wrap that label in <strong>. Don't rely on bold alone, or on color alone, to tell someone a step is dangerous.
Making Text Bold With CSS font-weight
When bold is only decoration, use CSS. The font-weight property takes normal (400), bold (700), the relative keywords bolder and lighter, or a number from 1 to 1000, per MDN's font-weight reference.
<style>
.price { font-weight: 700; }
.label { font-weight: 600; }
</style>
<p>Now <span class="price">$19</span>, <span class="label">limited stock</span>.</p>
The price renders bold and the label renders semibold if the font has a 600 weight. Headings and table header cells are already bold in the browser's default styles, so you don't need any tag or class there.
If your bold doesn't show up, three causes cover most cases:
- A CSS reset sets
font-weight: normalonbandstrong. The standard's default style sheet gives themfont-weight: bolder, and a reset can override it. - Your web font loads only the regular weight. The browser may then draw a synthetic "faux bold," which
font-synthesis-weight: noneturns off. - A typo in the closing tag, such as
<b>closed with<\b>, leaves the tag open.
i vs em: The Same Split for Italics
Italics split the same way. The spec defines <em> as "stress emphasis," the kind that changes what a sentence means when you say it aloud.
<p>I <em>never</em> said she took the money.</p>
<p>I never said <em>she</em> took the money.</p>
Both lines render with one italic word, but they make different claims. <i>, by contrast, marks an alternate voice or mood. Think of a technical term, a phrase from another language, a ship name or a character's thought, as in <i>carpe diem</i>.
If you write in Markdown, you rarely type these tags. Our Markdown bold and italic guide covers the asterisk syntax that produces them.
mark, s, del, u, ins, sup and sub: Other Text-Level Tags
These tags round out inline formatting. Each one has a specific job, and the default look is only a hint of it.
| Tag | Meaning in the spec | Default look | Markdown route |
|---|---|---|---|
<mark> | Text highlighted for relevance, like search hits | Yellow background | Raw HTML, see highlights and color |
<s> | Content that's no longer accurate, such as an old price | Strikethrough | Raw HTML |
<del> | Text removed in an edit | Strikethrough | ~~text~~ in GFM, see strikethrough |
<u> | A non-textual annotation, such as a misspelling mark | Underline | Raw HTML, see underline workarounds |
<ins> | Text added in an edit | Underline | Raw HTML |
<sup> and <sub> | Superscript and subscript | Raised or lowered, smaller | Raw HTML, see subscript and superscript |
<small> | Side comments and fine print | Smaller text | Raw HTML |
The <s> and <del> pair trips people up most. The standard says <s> isn't appropriate for document edits, so use <del> (and <ins>) when you're tracking changes. Note that GFM's ~~text~~ outputs <del>, so an outdated price needs a raw <s> tag.
Using HTML Bold Tags Inside Markdown
Markdown already writes the semantic tag for you. Per the CommonMark spec, double asterisks become <strong> and single asterisks become <em>.
**Back up your files** before you upgrade.
That converts to the following HTML:
<p><strong>Back up your files</strong> before you upgrade.</p>
You need a raw HTML bold tag in two cases. The first is when you want <b> rather than <strong>, since Markdown has no syntax for it. The second is inside a raw HTML block, such as a table built with <table> tags. CommonMark passes those lines through as HTML and leaves the asterisks unparsed.
We prefer Markdown's double asterisks for everyday writing, because the importance is usually real. The Bold button and Ctrl+B (Cmd+B on Mac) in our editor insert that syntax. The sample below is already loaded, and the preview shows how each line renders. To see the tags themselves, choose Export as HTML from the Download/Export menu.
The exported file shows <strong> for the asterisk lines and keeps your raw tags as written. Inline HTML tags such as <sub> and <sup> also render in the editor's live preview.
Choosing the right html bold tag comes down to one question: does the bold change the meaning? If it does, use <strong>. If it only guides the eye, use <b> or CSS font-weight. The same logic covers <em> and <i>. Write your next draft in Markdown in the editor, then run it through the Markdown to HTML converter to check the tags it produces.