Description

The <source> element represents a time and/or date.

This element is intended as a way to encode dates and times in a machine-readable format, so that user agents can offer to add event reminders such as birthdays and anniversaries, or any event scheduling for user's calendar.

The following table summarizes the usages context and the version history of this tag.

Placement:Inline
Content:Inline and text, but no descendant <time> elements
Start/ End Tag:Start tag: required, End tag: required
Version:HTML 5

Syntax

The basic syntax of the <source> tag is given with:

HTML/XHTML: <time> ... </time>

The example below shows the <source> tag in action.

<p>The library opens at <time>8:30 am</time> every morning.</p>
<p>The concert took place on <time datetime="2016-12-31 12:00">31 Dec</time>.</p>

Tag-Specific Attributes

The following table shows the attributes that are specific to the <source> tag.

Global Attributes

Like all other HTML tags, the <source> tag supports the global attributes in HTML5.

Event Attributes

The <source> tag also supports the event attributes in HTML5.

Browser Compatibility

Element
<source>YesYesYesYesYes