HOW-TO

How to bold text in HTML (strong, b and font-weight)

The two bold tags, when to use each, bolding with CSS, bold weights from 100 to 900, and the reasons bold text sometimes looks normal.

4 min read·

To bold text in HTML, wrap it in <strong> tags: <strong>Due Friday</strong>. Browsers show it in bold by default. You can also use <b>, or the CSS rule font-weight: bold when you want to bold something for looks alone.

<strong> or <b>?

Both look the same on screen. The difference is meaning:

  • ✓<strong> marks text as important. Screen readers and search engines can treat it that way. Use it for warnings, deadlines and the key phrase in a sentence.
  • ✓<b> draws attention without saying the text is important, such as a product name or a keyword in a summary.
  • ✓If you are not sure, use <strong>.

Bold with CSS

For styling, such as bold table headers or a bold label on every card, use CSS instead of adding tags everywhere:

<style> .label { font-weight: bold; } </style>

<span class="label">Total:</span> $1,240

For a single element, a style attribute works too: <p style="font-weight: bold;">Paid in full</p>.

Heavier or lighter bold

font-weight also takes numbers from 100 (thin) to 900 (black). 400 is normal and 700 is the same as bold. A value like 600 (semi-bold) only looks different if the font has that weight; with a basic system font, the browser rounds to the nearest weight it has, so 600 and 700 may look identical.

If you load a web font, request the weights you use. For Google Fonts that means adding them to the link, for example family=Inter:wght@400;700. See how to use a custom font in a shared page.

When bold does not show

  • ✓You typed **text** or __text__: that is Markdown, not HTML. In an .html file the asterisks show as plain characters. Use <strong>.
  • ✓A reset or framework removes it: some CSS resets set strong and b to font-weight: inherit. Right-click the text, choose Inspect and look for the rule that wins.
  • ✓The font has no bold weight: the browser fakes it or shows normal text. Load the 700 weight of the font.
  • ✓The tag is not closed: a missing </strong> bolds everything after it. Check that every <strong> has its closing tag.

Pages made with AI tools

Pages from Claude, ChatGPT and other tools often use Tailwind, where weight is a class: font-bold (700), font-semibold (600) and font-normal (400). Change the class on the element instead of adding a style attribute, so the two do not fight.

Share the page as a link

Bold looks heavier on some screens than others, so check the page on a phone before you send it. With FileShare Pro you upload the .html file from the dashboard, copy the link and send it; it opens as a page in any browser and the person opening it needs no account. To change something after you send it, fix the file and upload it to the same link. New to HTML? Start with how to create an HTML file. Sign up free to share your first page.

Frequently asked

How do I make text bold in HTML?

Wrap it in <strong> tags, for example <strong>Important</strong>. Browsers show it in bold.

What is the difference between <b> and <strong>?

They look the same. <strong> marks the text as important; <b> only draws attention. Use <strong> when in doubt.

How do I bold text with CSS?

Use font-weight: bold (or 700) on the element, for example in a class or a style attribute.

Why are my asterisks showing instead of bold text?

**text** is Markdown. HTML ignores it. Replace it with <strong>text</strong>.

Got a page to share?

Drop the file, copy the link — live in seconds, free plan included.

Start sharing free