HTML and CSS Reference
In-Depth Information
Yo u c a n a l s o a d d a t i m e , a s f o l l o w s :
<time datetime=”1978-06-27T23:58”>Two minutes to midnight, on my
p birthday</time>
In addition, you can add a time zone adjustment. To make the previous example
Central European Time (CET), you'd do this:
<time datetime=”1978-06-27T23:58Z+01:00”>Two minutes to midnight,
p on my birthday, CET</time>
There is one last bit of <time> syntax to discuss, which is particularly useful
to the blog example: If you want to specify that a declared time is the publication
date of the content it resides within, you can use the pubdate attribute, like so
(although the removal of this attribute from the spec is being debated at the time
of this writing, so it might disappear):
<time datetime=”1978-06-27” pubdate>27th June 1978</time>
A number of people complained in the past that they were not able to mark
up imprecise times using <time> , like you would in documents like museum cata-
logues. This has been updated to mitigate this problem somewhat: Now you can
do things like this:
<time datetime=”1983”>The year 1983</time>
<time datetime=”1983-12”>December 1983</time>
<time datetime=”12-25”>25 November (any year)</time>
<time datetime=”1983-W23”>Week 23 in 1983</time>
<time datetime=”P 20 D”>A period of 20 days</time>
 
Search WWH ::




Custom Search