HTML5 mark tag, Example of <mark> tag in html5.


 

HTML5 mark tag, Example of <mark> tag in html5.

In this tutorial, We will inform you about the <mark>tag in html5.

In this tutorial, We will inform you about the <mark>tag in html5.

HTML5 mark tag, Example of <mark> tag in html5.

In this tutorial, We will inform you about the <mark> tag in html5. This tag is used to highlight the text in the html document. The highlighted text get the much more emphasis with the surrounding text . We can mark the text using many properties from global attributes of html5 e.g. by changing font ,background color ,font color etc. This tag must have opening and closing <mark> tag.

Declaration syntax:

The syntax of the <mark> tag is as:

<mark>Your Text Here</mark>

This tag have no specific attribute , Only global attribute is used with this tag.

Example: mark_tag.html.

<!DOCTYPE html>
<html>
  <head>
      <title>Example of mark Tag</title>
  </head>
   <body>The normal text here.<br>
          <mark style="background-color:red;">
           This is the marked text.</mark>
           <br>  Marked text is highlighted.
  </body> 
</html>

Output:

Download This Example:

Difference between HTML5 and HTML4

This is the new introduction in html5.

Ads