Note/Info The mark tag is a new tag in HTML5.
HTML5 <mark> tag
The <mark> highlights a part of the text on which it is applied.
Generally, the marked text is highlighted in yellow background with the color of the text as black.
This is one of the HTML Formatting tags. Click here to learn about all the HTML Formatting tags.
Syntax:
<mark> text…</mark>
Default CSS Values
background-color: yellow;
color: black;
How Browser will display
INLINE.
Difference between HTML4.01, XHTML and HTML5
HTML4 | XHTML | HTML5 |
---|---|---|
NA | NA | New tag in HTML5 |
Attributes used with <mark> tag
NONE
Global Attributes
The <mark> tag supports Global attributes.
Event Attributes
The <mark> tag supports Event attributes.
Supporting Browsers
Related Tags
<em>, <b>, <strong>, <code>, <ins>, <del>, <i>, <small>, <sub>, <sup>, <samp>, <code>, <kbd>, <var> tags.