What is mark element in HTML?
The mark element defines the text that is marked or highlighted in an HTML document.
We can use the mark element with the blockquoteblockquote element in an HTML document while defining something that already belongs to another source.
Syntax
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.
Code
Example 01
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.
Example 02
The following example uses <mark> tag, which changes the look of the marked content.
Free Resources