Home Tutorial Html Html5 HTML5 time tag, Example of <time> in html5

 
 

HTML5 time tag, Example of <time> in html5
Posted on: September 17, 2010 at 12:00 AM
Advertisement
In this example, We will inform you about the <time> tag in html5.

HTML5 time tag, Example of <time> in html5

In this example, We will inform you about the <time> tag in html5. The <time> tag is used to define the date time in the html document. We can define date, time or date&time both by using this tag in the html document.

Declaration Syntax:

The syntax of <time> tag is as:

<time datetime="value"> Text Here</time>

This tag is new introduction in html5. This tag have a specific attribute "datetime" is as:

datetime="value"    The value of the attribute must be valid date or time. This attribute specify the date and time.

                                  The date or time must be in standard format

Example: time_tag.html:

<!DOCTYPE html>
<html>
  <head>
      <title>Example of Time Tag</title>
  </head>
   <body>The Timing of the meeting<br>
        is <time datetime="2010-09-16">6pm  at delhi house.</time>
  </body> 
</html>

Output:

Download This Example:

difference between html4.01 and html5:

This is new introduction in html5.

Advertisement

Related Tags for HTML5 time tag, Example of <time> in html5:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: September 17, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com