HTML5 <mark>Tag


Example

Highlight part of the text:

<p>Do not forget to buy <mark>milk</mark> today.</p>

Try it yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

Internet Explorer 9+, Firefox, Opera, Chrome, and Safari support the <mark> tag.

Note:Internet Explorer 8 and earlier versions do not support the <mark> tag.


Tag definition and usage instructions

The <mark> tag defines marked text.

Use the <mark> tag when you need to highlight text.


Differences between HTML 4.01 and HTML5

<mark> is a new tag in HTML5.


Global Attributes

The <mark> tag supports global attributes. View the full attribute table.HTML Global Attributes。


Event Attributes

The <mark> tag supports allHTML Event Attributes。

Other Extensions