HTML highlight text - how to use <mark> tag

The HTML <mark> tag is used to highlight text. By default, the marked text appears highlighted in yellow.


The mark tag supports the global and event attributes.


<p>The building blocks of web pages is <mark>HTML</mark>.</p>

Related HTML tags:

  • <em> - used to emphasize text
  • <strong> - used to mark text as important