Articles → HTML → Mark Tag In HTML

Mark Tag In HTML






Purpose





Syntax


<mark>text to be highlighted</mark>



Example


<html>
   <head>
      <title>mark demo</title>
   </head>
   <body>
      Please check with
      <mark>sumit</mark>
      on this.
   </body>
</html>

Try It


Output


Picture showing the output of mark tag in html



Changing The Background And Text Color




<html>
   <head>
      <title>mark demo</title>
      <style type="text/css">
         mark
         {
         background-color: red;
         color: white;
         }
      </style>
   </head>
   <body>
      Please check with
      <mark>sumit</mark>
      on this.
   </body>
</html>

Try It



Picture showing the output of mark tag with changed background color



Browser Support


Internet ExplorerFirefoxChromeSafariOperaEdge
9.04.06.05.011.1Yes



Posted By  -  Karan Gupta
 
Posted On  -  Monday, October 10, 2016
 
Updated On  -  Friday, September 22, 2017

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250