Text
Inline elements
Published on
Description
Inline style elements like <strong>, <em>, <code>, <kbd>, <sub>, <sup>, <abbr>, and others provide visual and semantic emphasis within text.
Example
Accessibility
<strong>and<em>convey emphasis but most screen readers do not change pronunciation by default.<sub>and<sup>announcements vary across screen readers. NVDA has a preference setting for announcements; VoiceOver offers Braille-only support; JAWS lacks support entirely.- CSS
vertical-aligncan break NVDA's sub/sup detection — use native elements rather than CSS positioning. <abbr>with atitleattribute provides the expanded form, buttitleis not reliably exposed across assistive technologies.
References
- Brief Note on Super- and Subscript Text (opens in new tab) — Adrian Roselli
- Tweaking Text Level Styles (opens in new tab) — Adrian Roselli
Related
- Inline format elements — for editorial marks (del, ins, mark)
Variables
None for inline elements