HTML - <mark> Tag
Introduction to <mark> Tag
The HTML <mark> tag is used to highlight the text that is relevant or important to the context of the content. It visually highlight the text by default withe the yellow background. It is used to draw attention to a specific word or phrases such as keywords or search results.
The <mark> tag is the part of the HTML5 semantic tags and can be styled further by using the CSS.
Syntax
Following is the syntax of HTML <mark> tag −.
<mark> .... </mark>
Attributes
HTML mark tag supports Global and Event attributes of HTML.
Example : Highlighting Key Terms
Let's look at the following example, where we are going to use the <mark> tag to highlight the importance in the context.
<!DOCTYPE html>
<html>
<body>
<p><mark>HTML</mark> is a standard markup language, which stands for <mark>Hyper Text Markup Language</mark>. It is widely used language to create webpages. </p>
</body>
</html>
Example : Customized Highlight with CSS
Consider the following example, where we are going to use the <mark> tag along with the CSS.
<!DOCTYPE html>
<html>
<head>
<style>
mark {
font-style: italic;
background-color: green;
padding: 4px;
}
</style>
</head>
<body>
<p>
<mark>Tutorialspoint</mark> Simply Easy Learning</p>
</body>
</html>
Supported Browsers
| Tag | ![]() |
![]() |
![]() |
![]() |
![]() |
|---|---|---|---|---|---|
| mark | Yes 6.0 | Yes 9.0 | Yes 4.0 | Yes 5.0 | Yes 11.1 |
html_tags_reference.htm
Advertisements




