The mark tag in HTML5

  • A K
  • A K
  • Updated date, Oct 18, 2019

The mark tag in HTML5

 
The <mark> tag is used to mark selected text. This is the same as the highlighter pen. So if we need to mark some text on our page, then we use this tag. Its syntax is given below. <mark> text to be marked </mark> Now we use this tag. We write the following code
  1. <!DOCTYPE HTML>  
  2. <html>  
  3.     <body>  
  4.         <p>I am working on c,c#,ASP.Net,ADO.Net,  
  5.             <mark>HTML5</mark> and PHP.  
  6.         </p>  
  7.     </body>  
  8. </html>  
Run the code. We note that the text which is between <mark> and </mark> tag is displayed in yellow color. The output will look like as below figure:

mark tag in html5