HTML and CSS Reference
In-Depth Information
Adding the time element to your blog
Edit your “blog.html” file, and add the following dates below each article heading:
<article>
<h1> Starbuzz meets social media </h1>
<time datetime="2012-03-12"> 3/12/2012 </time>
...
</article>
<article>
<h1> Starbuzz uses computer science </h1>
<time datetime="2012-03-10"> 3/10/2012 </time>
...
</article>
<article>
<h1> Most unique patron of the month </h1>
<time datetime="2012-02-18"> 2/18/2012 </time>
...
</article>
Th e con tent o f the time eleme nt is the
da te of the b log po st (w ritten Amer ican
st yle, w ith th e mon th fir st). Y ou cou ld als o
w rite M arch 10, 2 012 if you want.
We're using the datetim e attribute
of the <time> element to specify the
precise date using the o fficial Internet
date/time format for d ates.
Test drive the blog
Test drive the blog again, and you should
see the date of the blog post show up
underneath each blog post heading.
 
Search WWH ::




Custom Search