Articles → HTML 5 → Time Tag In Html5

Time Tag In Html5






Human-Readable Vs Machine-Readable Information




  1. Humans can understand.
  2. Encoded in ASCII or Unicode text.
  3. Requires more storage than machine-readable information.


  1. Machine can understand
  2. Humans cannot understand
  3. Encoded in binary
  4. Requires less storage than human-readable information.

Time Tag





Syntax


<time>time_specified</time>



Example


<!DOCTYPE html>
<html>
  <body>
    <p>We will meet at <time>10:00 AM</time> tomorrow.</p>
  </body>
</html>

Try It



Picture showing the output of time tag in html5
Click to Enlarge


Browser Support


Internet ExplorerFirefoxChromeSafariOperaEdge
9.04.06.05.011.1Yes



Datetime Attribute




<!DOCTYPE html>
<html>
<body>

<p>We will meet at <time datetime="2019-06-02 18:00">10:00 AM</time> tomorrow. </p>

</body>
</html>

Try It



Picture showing the output of time tag with datetime attribute in html5
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Friday, June 7, 2019

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250