Codectionary / Developer documentation / HTML

Text Formatting: <strong>, <em>, <b>, <i>, <mark>, <small>

HTML provides several inline elements for formatting text with semantic and visual meaning. <strong> indicates strong importance (typically rendered bold), and <em> indicates stress emphasis (typically rendered italic) — both carry semantic weight that screen readers can announce. <b> and <i> are their purely visual counterparts, used when bold/italic styling is needed without implying importance or emphasis. <mark> highlights text as relevant to the current context, and <small> represents side comments like fine print or disclaimers.

Syntax

<strong>Important text</strong>
<em>Emphasized text</em>
<mark>Highlighted text</mark>

Examples

Semantic Emphasis

Using strong and em for meaningful emphasis within a sentence.

<p>This step is <strong>absolutely required</strong> before continuing, and you should <em>really</em> double-check it.</p>

Visual-Only Styling

Using b and i when bold/italic styling is needed without implying importance.

<p>The ship <i>Titanic</i> set sail in 1912. Its name was later used for <b>Titanic</b>, the 1997 film.</p>

Highlighting Search Results

Using mark to highlight matched text, and small for a disclaimer.

<p>Results for "closures": JavaScript <mark>closures</mark> let inner functions access outer scope.</p>
<p><small>Prices shown do not include tax.</small></p>

Best practices

  • Use <strong>/<em> when the emphasis is semantically meaningful; use <b>/<i> for purely visual styling with no added meaning
  • Do not use these elements just to make text bold or italic for decoration — prefer CSS font-weight/font-style for pure styling
  • Use <mark> sparingly, for content that is genuinely relevant to what the user is currently looking for
  • <small> is for fine print and side comments, not for making arbitrary text visually smaller

Browser compatibility

Support applies to the named feature, not every attribute or behaviour in this article. Versions refer to browsers, not operating systems.

<strong>

Desktop

Chrome
Supported
From 1
Firefox
Supported
From 1
Safari
Supported
By 4 (possibly earlier)
Edge
Supported
From 12
Opera
Supported
From 15

Mobile

Safari on iOS
Supported
By 3.2 (possibly earlier)
Chrome for Android
Supported
From 18
Firefox for Android
Supported
From 4
Samsung Internet
Supported
From 1.0

MDN BCD record for this feature · MDN reference

Support history and limitations

Chrome

  • From 1

Firefox

  • From 1 · Before Firefox 4, creating a <strong> element incorrectly resulted in an HTMLSpanElement object, instead of the expected HTMLElement.

Safari

  • By 4 (possibly earlier)

Edge

  • From 12

Opera

  • From 15

Safari on iOS

  • By 3.2 (possibly earlier)

Chrome for Android

  • From 18

Firefox for Android

  • From 4

Samsung Internet

  • From 1.0
<em>

Desktop

Chrome
Supported
From 1
Firefox
Supported
From 1
Safari
Supported
By 4 (possibly earlier)
Edge
Supported
From 12
Opera
Supported
From 15

Mobile

Safari on iOS
Supported
By 3.2 (possibly earlier)
Chrome for Android
Supported
From 18
Firefox for Android
Supported
From 4
Samsung Internet
Supported
From 1.0

MDN BCD record for this feature · MDN reference

Support history and limitations

Chrome

  • From 1

Firefox

  • From 1

Safari

  • By 4 (possibly earlier)

Edge

  • From 12

Opera

  • From 15

Safari on iOS

  • By 3.2 (possibly earlier)

Chrome for Android

  • From 18

Firefox for Android

  • From 4

Samsung Internet

  • From 1.0
<b>

Desktop

Chrome
Supported
From 1
Firefox
Supported
From 1
Safari
Supported
From 1
Edge
Supported
From 12
Opera
Supported
From 15

Mobile

Safari on iOS
Supported
From 1
Chrome for Android
Supported
From 18
Firefox for Android
Supported
From 4
Samsung Internet
Supported
From 1.0

MDN BCD record for this feature · MDN reference

Support history and limitations

Chrome

  • From 1

Firefox

  • From 1 · Before Firefox 4, this element implemented the HTMLSpanElement interface instead of the standard HTMLElement interface.

Safari

  • From 1

Edge

  • From 12

Opera

  • From 15

Safari on iOS

  • From 1

Chrome for Android

  • From 18

Firefox for Android

  • From 4

Samsung Internet

  • From 1.0
<i>

Desktop

Chrome
Supported
From 1
Firefox
Supported
From 1
Safari
Supported
From 1
Edge
Supported
From 12
Opera
Supported
From 15

Mobile

Safari on iOS
Supported
From 1
Chrome for Android
Supported
From 18
Firefox for Android
Supported
From 4
Samsung Internet
Supported
From 1.0

MDN BCD record for this feature · MDN reference

Support history and limitations

Chrome

  • From 1

Firefox

  • From 1

Safari

  • From 1

Edge

  • From 12

Opera

  • From 15

Safari on iOS

  • From 1

Chrome for Android

  • From 18

Firefox for Android

  • From 4

Samsung Internet

  • From 1.0
<mark>

Desktop

Chrome
Supported
From 7
Firefox
Supported
From 4
Safari
Supported
From 5.1
Edge
Supported
From 12
Opera
Supported
From 11

Mobile

Safari on iOS
Supported
From 5
Chrome for Android
Supported
From 18
Firefox for Android
Supported
From 4
Samsung Internet
Supported
From 1.0

MDN BCD record for this feature · MDN reference

Support history and limitations

Chrome

  • From 7

Firefox

  • From 4

Safari

  • From 5.1

Edge

  • From 12

Opera

  • From 11

Safari on iOS

  • From 5

Chrome for Android

  • From 18

Firefox for Android

  • From 4

Samsung Internet

  • From 1.0
<small>

Desktop

Chrome
Supported
From 1
Firefox
Supported
From 1
Safari
Supported
By 4 (possibly earlier)
Edge
Supported
From 12
Opera
Supported
From 15

Mobile

Safari on iOS
Supported
By 3.2 (possibly earlier)
Chrome for Android
Supported
From 18
Firefox for Android
Supported
From 4
Samsung Internet
Supported
From 1.0

MDN BCD record for this feature · MDN reference

Support history and limitations

Chrome

  • From 1

Firefox

  • From 1

Safari

  • By 4 (possibly earlier)

Edge

  • From 12

Opera

  • From 15

Safari on iOS

  • By 3.2 (possibly earlier)

Chrome for Android

  • From 18

Firefox for Android

  • From 4

Samsung Internet

  • From 1.0

MDN BCD 8.1.5 · Dataset built 2026-10-08 · Mapping reviewed 2026-10-21. These dates are not individual browser-test or claim-verification dates. Unknown means the data does not establish support.

HTML Living Standard

Specifications & further reading