HTML5: Hightlighting text with the <mark> element

This entry is part 15 of 34 in the series HTML5

The <mark> element allows some text in the document to be highlighted.
 
Codecrawl.com – HTML 5
The default color for the highlighted text is yellow and this default color could be changed using CSS.

<!DOCTYPE html>
<html>
<head lang='en'>
    <meta charset='UTF-8'>
    <title>Codecrawl.com - HTML 5</title>
</head>
<body>

<p>Rod Stewart is one of the
    <mark>best-selling music artists of all time</mark>
    , having sold over 100 million records worldwide.
</p>

</body>
</html>

We can make some adjustments to the highlighting color by using CSS:

mark { background-color: lime; font-weight: bold; }

Series Navigation<< HTML5: Marking up date and time with the <time> element
HTML5: Making a form with <fieldset> >>