HTML Highlighting


Example

The <mark> element is new in HTML5 and is used to mark or highlight text in a document "due to its relevance in another context".1

The most common example would be in the results of a search were the user has entered a search query and results are shown highlighting the desired query.

<p>Here is some content from an article that contains the <mark>searched query</mark>
that we are looking for. Highlighting the text will make it easier for the user to 
find what they are looking for.</p>

Output:

Black text on yellow background is a common default style for the mark element

A common standard formatting is black text on a yellow background, but this can be changed with CSS.