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
The following table will show you the current browser support for the HTML <mark>
tag.
Desktop | |||||
![]() |
![]() |
![]() |
![]() |
![]() |
|
12 | 7 | 4 | 11 | 5.1 |
Tablets / Mobile | |||||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
18 | 4 | 14 | 5 | 1 | 4.4 |
Last updated by CSSPortal on: 30th September 2023