DEV Community

RajeshKumarYadav.com
RajeshKumarYadav.com

Posted on • Updated on

HTML : Highlighting Text

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".

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>
Enter fullscreen mode Exit fullscreen mode

Alt Text

Buy Me A Coffee

With all that being said, I highly recommend you keep learning!

Thank you for reading this article. Please feel free to connect with me on LinkedIn and Twitter.!important;" >

Top comments (0)