What is mark element in HTML?

The mark element defines the text that is marked or highlighted in an HTML document.

We can use the mark element with the blockquoteWe use the blockquote element in an HTML document while defining something that already belongs to another source. element to highlight the quoted text. This makes the quoted text even more meaningful to the user.

Syntax

Like other HTML tags, a mark element must be inside tags (<>): <mark>. We use this tag in headings or paragraphs to emphasize essential details and grab the reader’s attention.

how <mark> tag works

Code

Example 01

Observe the following example where the <mark> element highlights only the necessary detail inside the paragraph tag - <p>.

Note: The default color for the highlighted text inside the <mark> tag is yellow.

HTML <mark> element

Example 02

The following example uses CSSCascading Style Sheets to implement an HTML document with the <mark> tag, which changes the look of the marked content.

Using <mark> tag with CSS

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved