HTML <mark> Tag
Description
The <mark>
HTML element marks the text as selected. In the browser, the background color of the text inside the <mark>
is highlighted in yellow.
Authors usually use <mark>
to draw the reader’s attention to parts of the text. Note that such a text does not say anything about the importance of the selected fragment, but only suggests paying attention to it.
Properties
- Permitted Parents
- Any element that accepts phrasing content
- Content
- Inline and text
- Start/End Tags
- Start tag: required, End tag: required
Example
The Australian population is <mark>22.68 million</mark> people as of 2012
Attributes
None
Global Attributes
The <mark>
tag also supports the Global Attributes in HTML5
Event Attributes
The <mark>
tag also supports the Event Attributes in HTML5
Browser Support
Desktop | |||||
9 | 12 | Yes | 4 | 11 | Yes |
Tablets / Mobile | |||||
![]() |
|||||
Yes | Yes | 4 | Yes | Yes | Yes |
Last updated by CSSPortal on: 6th December 2019