English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The HTML <mark> tag is used to tag or highlight text in an HTML document that is of special interest or relevance. Traditionally, browsers will present the text found within the <mark> tag as text with a yellow background color. This tag is also commonly referred to as the <mark> element.
Highlighting some text:
<!doctype html> <html> <head> <meta charset="UTF-8">-8"> <title>HTML</title>5 mark标签的使用(基础教程网 oldtoolbag.com)</mark>/title> </head> <body> <h1>Heading 1</h1> <p>The Math test is on <mark>Friday</mark>/mark>.</p> </body> </html>Test to see ‹/›
IEFirefoxOperaChromeSafari
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.
<mark> tag defines marked text.
Please use the <mark> tag when you need to highlight text.
Most browsers will display the <mark> tag with a yellow background color, but you can change this behavior with CSS.
<mark> tag defines related text and is not intended to be used only for applying highlighter style. If you want to style text to highlight it, please use <span> tag and the correct CSS.
<mark> is an HTML5 new tags.
<mark> tag supports global attributes, see the complete attribute table HTML Global Attributes.
<mark> tag supports all HTML Event Attributes.