Emphasis and Importance: strong, em, b and i
Four elements, two that look bold and two that look italic, and the pairs are not interchangeable. The difference is meaning, and screen readers act on it.
-
HTML Basics
- What is HTML: The Structure Layer of Every Web Page
- HTML Document Structure: DOCTYPE, html, head and body
- Elements, Tags and Attributes: The Vocabulary of HTML
- HTML Comments: Notes That Ship With Your Code
- Block Level and Inline Elements
- Writing and Running Your First HTML Page
- How a Browser Turns Markup Into a Page
- Text and Formatting
- Links and Navigation
- Images and Media
- Lists
- Tables
-
Forms
- Form Structure: form, action and method
- Input Types: Text, Email, Number, Date and the Rest
- Labels: The Most Important Element in a Form
- Checkboxes, Radio Buttons and Grouping
- select, option, optgroup and datalist
- textarea, File Uploads and Hidden Fields
- Buttons: submit, reset and button
- Built In Form Validation
- GET or POST: What Happens When a Form Is Submitted
- Semantic HTML
- HTML5 Features
- Head and Metadata
- HTML with CSS
- HTML with JavaScript
- Accessibility
-
HTML SEO
- How Google Works: Crawling, Indexing and Ranking
- SEO Friendly HTML Structure
- Titles and Descriptions That Earn Clicks
- Headings and Content Structure for Search
- Internal Linking and Anchor Text
- robots.txt and XML Sitemaps
- Canonical URLs and Duplicate Content
- Structured Data and JSON-LD
- Image SEO
- Core Web Vitals and Mobile Friendliness
- DevTools and Debugging
- Editor Productivity
- HTML Best Practices
- HTML Projects
- Advanced Projects
- Practice and Exams
Concept
HTML has two elements that render bold and two that render italic. Visually the pairs are identical. Semantically they are opposites: one pair carries meaning, the other pair carries only appearance.
| Element | Renders as | Means |
|---|---|---|
strong | Bold | This content has strong importance, seriousness or urgency |
b | Bold | Draw attention to this, with no extra importance implied |
em | Italic | Stress emphasis - the sentence changes meaning when this word is stressed |
i | Italic | An alternate voice: a term, a taxonomic name, a phrase in another language, a thought |
The rule that resolves almost every case: if reading the sentence aloud with that word stressed changes what the sentence means, it is em. If the content matters more than the rest of the sentence, it is strong. Otherwise you probably want b, i, or a CSS class.
Syntax
<p><strong>Do not</strong> switch the device off while it updates.</p>
<p>I said the meeting is on <em>Tuesday</em>, not Thursday.</p>
<p>The <b>refund window</b> is thirty days from delivery.</p>
<p>The dish is served with <i lang="hi">kadhi</i> on the side.</p>Example: how em changes meaning
The same sentence, stressed four different ways, means four different things:
<p><em>She</em> approved the design.</p> <!-- she did, not someone else -->
<p>She <em>approved</em> the design.</p> <!-- approved, not merely saw -->
<p>She approved <em>the</em> design.</p> <!-- that one specifically -->
<p>She approved the <em>design</em>.</p> <!-- the design, not the budget -->A screen reader can change its intonation for em. No such thing is possible with an italic span, because there is nothing in the markup to act on.
Example: nesting strong
strong nests, and each level raises the importance of what is inside it:
<p><strong>Warning: <strong>never</strong> connect the two terminals directly.</strong></p>Explanation
The distinction exists because HTML separates content from presentation. Before HTML5, b and i were defined purely as bold and italic, which made them presentational and therefore discouraged. They were then redefined with meanings of their own, so both pairs are valid today - but they mean different things and are not substitutes for one another.
Practically: strong and em are what you want most of the time in prose. b is for keywords in a summary, a product name in a review, the lead sentence of an article. i is for a technical term on first use, a ship or a book name, a foreign phrase, or a character thinking.
Important rules
- All four are inline and may contain other inline elements.
strongandemare exposed to assistive technology.bandigenerally are not.- Bold and italic are only defaults. CSS can render
strongin red small caps and it still means importance. - Pair
iwithlangwhen it marks a foreign phrase, so pronunciation is correct. - Never use these elements to make a heading. A heading is a heading.
Common mistakes
- Using
<b>as a substitute for a heading, which produces a page with no outline at all. - Wrapping a whole paragraph in
strong. If everything is important, nothing is, and a screen reader emphasises the entire block. - Reaching for
<span style="font-weight:bold">. If the word matters, it deserves an element; if it does not, it does not need bolding. - Using
emfor a book title. That is an alternate voice, soiorcite. - Believing
bandiare deprecated. They are not; they are just narrower than most people assume.
Best practices
- Default to
strongandemin body copy, and reach forbandionly when their specific meanings fit. - Emphasise a phrase, not a paragraph. One or two words is usually right.
- Add
langwheneveriholds a phrase from another language. - Consider
citefor the title of a work anddfnfor the defining instance of a term - both are more precise thani. - Read the sentence out loud. If the stress changes the meaning, the element is
em.
Practice
- Mark up: Never share your one time password. The bank will never ask for it. Which words get
strong, and why not the whole sentence? - Write one sentence four times, moving a single
emeach time, so that each version means something different. - Decide the correct element for each: a product name in a review, a warning on a medicine page, the Latin name of a plant, the stressed word in a correction.
- Find a page that uses bold text where a heading belongs. Rewrite that section so the outline is correct.