Pr.Pg Next Pg

<TIME>..</TIME> tag tutorials

  • The HTML <TIME> tag is used for declaring the date or time within an HTML document.

  • The <TIME> tag was introduced in HTML 5.

  • Below is the list of attributes of <time> tag.

 

Sr No

Attributes

Descriptions

1

class

This attribute specify one or more class names for an element refers to a class in a style sheet.

2

datatime

This attribute is used to indicate the date and time of the enclosed content. The value of the attribute is a date in a special format as defined by ISO 8601.

The basic date format is : YYYY-MM-DDThh:mm:ssTZD

3

draggable

This attribute specifies whether an element is draggable or not.

4

hidden

This attribute specifies that an element is not yet, or is no longer, relevant.

5

id

This attribute specifies a unique id for an element in html page.

6

spellcheck

This attribute specifies whether the element is to have its spelling and grammar checked or not.

7

style

This attribute specifies an inline CSS style for an element.

8

title

This attribute specifies extra information about an element.

 

Syntax:

<body>

<time>.</time>

</body>

 

Example: HTML program to demonstrate time element

Output:
Pr.Pg border                                              Next Pg