<mark> to highlight

The <mark> element represents a span of text that is highlighted.

 
<!DOCTYPE HTML> 
<html> 
    <head> 
        <title>Example</title> 
    </head> 
<body> 
    <mark>HTML</mark> is <mark>cool</mark>.
</body> 
</html>
  
Click to view this demo.

The mark element with additional CSS

 
<!DOCTYPE HTML> 
<html> 
    <head> 
        <title>Example</title> 
         <style> 
         mark {background-color: #0F0; font-weight:bold;} 
         </style> 
    </head> 
<body> 

         <article>  <header> 
              <h1>Something in Latin</h1> 
           </header> 
          <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac 
         turpis egestas. <mark>Vestibulum tortor quam</mark>, feugiat vitae, 
         ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam 
         egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend 
         leo.</p> 
         </article> 
</body> 
</html>
  
Click to view this demo.
Home 
  HTML CSS Book 
    HTML  

Related: