Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML5 <mark> tag


May 04, 2021 HTML Reference Manual


Table of contents


HTML5

If you need to highlight the text of a section of an HTML document, you can use the hashtag, for example, in the following example, we highlight the word "milk":

Some text highlights:

<p>今天别忘了买<mark>牛奶</mark>。</p>

Try it out . . .

Browser support

HTML5 <mark> tag HTML5 <mark> tag HTML5 <mark> tag HTML5 <mark> tag HTML5 <mark> tag

Internet Explorer 9 Plus, Firefox, Opera, Chrome, and Safari support the hashtag.

Note: Internet Explorer 8 and earlier versions do not support the label.


Label definition and instructions for use

Labels define marked text.

Use the slt;mark> label when you need to highlight the text.

Tip: Although you can do the same with labels, labels, and labels, their effect is to emphasize text, not just highlight text, so we don't recommend it.


The difference between HTML 4.01 and HTML5

The new HTML5 label.


Global properties

The label supports global properties and views the full property sheet HTML global properties.


The event property

Labels support all HTML event properties.