<mark>
The HTML <mark> element is used to highlight text, usually with a yellow background, to signify relevance or importance, like for search results or essential information.
mark tag
The <mark> element highlights text for emphasis, commonly used to draw attention to search results or important information.
Syntax
index.html
<mark>This text is highlighted.</mark>
mark Demo
We offer discounts on all our products this season.
index.html
<p>
We offer <mark>discounts</mark> on all our products this season.
</p>
Definition and Usage
The <mark> tag is used to highlight or emphasize text.
Attributes
- Includes only global attributes.
Key Points
- Purpose: Highlights or emphasizes text, making important content stand out.
- Styling: The default background color is yellow but can be customized with CSS.
- Browser Support: Compatible with all modern browsers.
See also
- Other text-level semantic elements:
<a> <em> <strong> <cite> <q> <dfn> <abbr> <time> <code> <var> <samp> <kbd> <sub> <sup> <i> <b> <mark> <ruby> <rp> <rt> <bdo> <span> <br> <wbr>.
Conclusion
The <mark> tag is an effective way to highlight important text on a webpage, making key information stand out. With its default yellow background and customizable styling options, it enhances readability and user experience. Fully supported by modern browsers, the <mark> tag is useful for emphasizing significant content.