HTML <mark> tag
Definition and usage
<mark>
The tag defines the text to be marked or highlighted.
See also:
HTML tutorial:HTML text formatting
HTML DOM reference manual:Mark object
Example
Highlight a part of the text:
<p>Don't forget to buy <mark>milk</mark> today.</p>
Global attributes
<mark>
The tag also supports Global attributes in HTML.
event attributes
<mark>
The tag also supports Event attributes in HTML.
Default CSS settings
Most browsers will display the following default values <mark>
Element:
mark { background-color: yellow; color: black; }
Browser support
The numbers in the table indicate the first browser version to fully support this tag.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
6.0 | 9.0 | 4.0 | 5.0 | 11.1 |