To highlight a specific word(s) in the web page we can use <mark>
tag in HTML5.
<style> /*mark{ background-color:aqua; }*/ </style> <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.
OUTPUT
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.