Loading...
HTML <time> Tag

HTML <time> Tag

In this tutorial, we will learn about time tag in HTML with the help of examples.


<time> Tag

Time tag <time> is used to display the human readable date and time.

Syntax

<time>..........</time>

Example

<!DOCTYPE html>
<html>
  <head>
    <title>time tag</title>
  </head>
  <body>
    <p>The time is <time>10:20 pm</time></p>
  </body>
</html>

Output

The time is


Specific Attribute

Attribute Value Description
datetime datetime It is used to represent a machine-readable format of the <time> tag

Global Attribute

Time Tag support all the global attributes of HTML.


Event Attribute

Time Tag support all the event attributes of HTML.


Next Tutorial

We hope that this tutorial helped you develop better understanding of the concept of <time> tag in HTML.

Keep Learning : )

In the next tutorial, you'll learn about HTML <title> Tag.

- Related Topics