HTML5 > Structures

Mark in HTML5

How to highlight specific words in the HTML5 web page?

To highlight a specific word(s) in the web page we can use <mark> tag in HTML5.


    <p>Hello, this is the demo of <mark>Mark</mark> element in HTML 5</p>

In the above code snipeet, we can notice that the word Mark is placed in <mark> tag and that is highlighted with yellow (default) background color.


If we want to change the default background color from yellow to something else, we can specify css class for that as specified in the <head> block above. If the css class above is uncommented, the highlighted text will appear in aqua background color.

 Views: 4513 | Post Order: 58

Write for us

Hosting Recommendations