HTML <mark> tag

Updated: 08/02/2020 by Computer Hope
HTML mark tag

When writing in HTML (hypertext markup language), the <mark> tag is an inline element used to highlight a section of text. It is useful in many instances. For example, you could use it to mark text of special relevance to a visitor, like results of a recent search. The following sections contain information about this tag, including an example of it in use, and related attributes and browser compatibility.

Example of <mark> code

Here is how you <mark>highlight text</mark> on your pages.

Example result

Here is how you highlight text on your pages.

Attributes

Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair. While the <mark> tag does not have any unique attributes, it does utilize all of the standard attributes.

Compatibility

Edge Internet Explorer Firefox Safari Opera Chrome
All versions 9.0+ 4.0+ All versions 11.1+ All versions

Browser, Compatibility, Container tag, HTML em tag, HTML strong tag, Web design terms