⚠️ Design system CSS not found. Check the path in cms/docs.config.js → designSystemPath, then re-run npm run docgen.

Mark, Abbr & Figure

Highlighted text, abbreviations, and media captions

Design System / Mark, Abbr & Figure
Download .md file
Open .md in new tab

The design system styles three semantic HTML elements for inline and block-level content enrichment.


Highlighted text (mark)

The <mark> element highlights text with a yellow background. In dark mode, the background shifts to a semi-transparent yellow.

This is highlighted text within a paragraph.

<p>This is <mark>highlighted text</mark> within a paragraph.</p>

Abbreviations (abbr)

The <abbr> element indicates an abbreviation or acronym. It renders with a dotted underline and shows the full text on hover via the native title attribute.

The design system uses CSS custom properties for all tokens.

<p>The design system uses <abbr title="Cascading Style Sheets">CSS</abbr> custom properties.</p>

Figure and figcaption

The <figure> element wraps media content (images, code blocks, diagrams) with an optional <figcaption> for descriptive text.

Image placeholder
Caption text describing the image above.
<figure>
  <img src="image.jpg" alt="Description">
  <figcaption>Caption text describing the image above.</figcaption>
</figure>

Accessibility

  • <mark> is announced by some screen readers as "highlighted" — use it for genuinely highlighted content, not for visual styling
  • <abbr> with title shows its expansion on hover — for critical abbreviations, spell out the full term on first use in the text
  • <figure> images must have meaningful alt text; <figcaption> provides supplementary context, not a replacement for alt

Usage rules

Do:

  • Use <mark> for search result highlights or key phrases
  • Use <abbr> for technical acronyms with a title attribute
  • Use <figure> for any media that benefits from a caption

Don't:

  • Don't use <mark> as a general-purpose text highlighter for emphasis — use <strong> or <em>
  • Don't omit title on <abbr> — it is the only way to convey the expansion
  • Don't use <figcaption> without a parent <figure>

CSS reference

This section documents how each element is built. For usage, see the sections above.

mark

Property Value
Background
Color
Padding 0 var(--space-2xs)

Dark mode ([data-theme="dark"]): background shifts to color-mix(in srgb, var(--yellow), var(--alpha-60)), colour to .

abbr[title]

Property Value
Text decoration underline dotted var(--text-faded)
Text underline offset 2px
Cursor help

figure

Property Value
Margin var(--space-xl) 0
Padding 0

figcaption

Property Value
Font size
Color
Margin top
Line height
Font style italic

Selectors

Selector Purpose
mark Highlighted text with yellow background
[data-theme="dark"] mark Dark mode override for mark
abbr[title] Abbreviation with dotted underline
figure Media wrapper with vertical margin
figcaption Caption text — small, italic, faded
On this page
  • Highlighted text (mark)
  • Abbreviations (abbr)
  • Figure and figcaption
  • Accessibility
  • Usage rules
  • CSS reference
Previous

Code

Next

Image

Was this page helpful?

We use this feedback to improve our documentation.

Thanks for your feedback

Send feedback

© 2026 By Default