HTML <mark> tag

The <mark> tag is used to make the highlighted text in the background. By default, the texts are black in color with yellow background.
It is useful to draw attention to a specific word or even a sentence within a long topic, also helps in showing highlight text on search engine results.

Type: Inline Element

Syntax of <mark> tag

<mark> Highlighted Text </mark>

Full code example

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p> This is normal text </p>
<p> This is <mark> highlighted text. </mark> </p> 
</body>
</html>
Run The code »

Output on the browser

This is normal text

This is highlighted text.

<mark> tag new in HTML5.

Supported Browsers

Tag Chrome Internet Explorer Firefox Safari Opera Mini
<mark> Yes Yes Yes Yes Yes

Default CSS properties of <mark> tag

mark {
  background-color: yellow;
  color: black;
}