The mark
element defines the text that is marked or highlighted in an HTML document.
We can use the mark
element with the blockquote
blockquote
element in an HTML document while defining something that already belongs to another source.
Like other HTML tags, a mark
element must be inside tags (<>
): <mark>
. We use this tag in headings or paragraphs to emphasize essential details and grab the reader’s attention.
Observe the following example where the <mark>
element highlights only the necessary detail inside the paragraph tag - <p>.
Note: The default color for the highlighted text inside the
<mark>
tag is yellow.
The following example uses <mark>
tag, which changes the look of the marked content.
Free Resources