Horje
HTML <mark> Tag

Highlight parts of a text.

Definition and Usage

The <mark> tag defines text that should be marked or highlighted.


Browser Support

The numbers in the table specify the first browser version that fully supports the element.

Global Attributes

The <mark> tag also supports the Global Attributes in HTML.


Event Attributes

The <mark> tag also supports the Event Attributes in HTML.


How to create HTML <mark> Tag

Highlight parts of a text.
index.html
Example: HTML
<p>Do not forget to buy <mark>milk</mark> today.</p>

Output should be:

How to create HTML <mark> Tag

How to set Default CSS Settings for MARK

Most browsers will display the <mark> element with the following default values.

index.html
Example: HTML
<!DOCTYPE html>
<html>
<head>
<style>
mark { 
  background-color: yellow;
  color: black;
}
</style>
</head>
<body>

<p>A mark element is displayed like this:</p>

<mark>Highlighted text!!</mark>

<p>Change the default CSS settings to see the effect.</p>

</body>
</html>

Output should be:

How to set Default CSS Settings for MARK





Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference