CSS Portal

HTML <mark> Tag

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
<mark>
HTML TagThis tag is supported by all modern browsers.
Updated 26th December 2025

Description

The <mark> HTML tag is used to highlight text within a document, typically to indicate relevance or emphasize a particular portion of content. The visual effect is usually a background color, most commonly yellow by default, which draws the reader's attention to the marked section. It is especially useful for highlighting search results, key terms, or important passages in a document.

Semantically, the <mark> element represents text that has been “marked” or highlighted for reference purposes, making it distinct from other forms of emphasis like <strong> or <em>, which indicate importance or stress rather than relevance. While <strong> or <em> conveys meaning to screen readers and search engines, <mark> primarily conveys that the text is noteworthy in a specific context, often temporary or context-driven.

The <mark> tag can contain phrasing content such as text, inline elements, and links. It is commonly used in combination with CSS to customize the highlight style beyond the default yellow background, allowing designers to match it with their website's theme.

Example of use:

<p>The following terms are important: <mark>HTML</mark>, <mark>CSS</mark>, and <mark>JavaScript</mark>.</p>

In this example, the words "HTML," "CSS," and "JavaScript" are visually highlighted to emphasize their importance in the context of the sentence.

Properties

Permitted Parents
Any element that accepts phrasing content
Content
Inline and text
Start/End Tags
Start tag: required, End tag: required

Example

The Australian population is <mark>22.68 million</mark> people as of 2012
Open in editor

Attributes

None

Global Attributes

The <mark> tag also supports the Global Attributes in HTML5

Event Attributes

The <mark> tag also supports the Event Attributes in HTML5

Browser Support

The following information will show you the current browser support for the HTML <mark> tag. Hover over a browser icon to see the version that first introduced support for this HTML tag.

This tag is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee