Widely available Supported across all major browsers. Safe to use in production.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
7
12
4
5.1
18
5
1+Supported (version) Not supported Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)

Syntax

HTML
<p>Search results: This text contains the keyword "<mark>HTML</mark>".</p>

Live demo

Text. hilight

Mark element in text hilightdisplay.searchresult. match to usage.

PreviewFullscreen

customstyle. hilight

Mark element. style kastamize.usage by. Colorsplit. with CSS

PreviewFullscreen

quoteinside. hilight

emphasis. with Blockquote withinspecial to partial mark.

PreviewFullscreen

Use cases

  • Using <mark>

    The <mark> HTML element represents text which is marked or highlighted for reference or notation purposes due to the marked passage's relevance in the enclosing context.

Cautions

  • May not be supported in older browsers.

Accessibility

  • Verify how this element is announced by screen readers.