Mark HTML

HTML <mark> Tag

To highlight a part of the text, to mark it as important for reference or any other notation purpose, the HTML <mark> tag is used. It was introduced in HTML5. It usually displays the content with a yellow background. The background color can be changed using the CSS style property.

Syntax:

<mark>Content</mark>

Example:

<!DOCTYPE html>
<html>
<body>
<p><mark>Success</mark> is not final. <mark>Failure</mark> is not fatal. It is the <mark>Courage</mark> to continue that counts.</p>
</body>
</html>

Explanation:

In the above example, we have used the HTML <mark> tag to highlight the important terms.

Global Attributes:

The HTML Global attributes are supported by the HTML <mark> tag.

Event Attributes:

The HTML Event attributes are supported by the HTML <mark> tag.

Supporting Browsers:

Chrome, IE, Firefox, Opera, and Safari.