"The
pubdate
attribute is a boolean attribute. If specified it indicates that the date and time given by the element is the publication date and time of the nearest ancestor<article>
element, or, if the element has no ancestor<article>
element, of the document as a whole." - WHATWG's HTML5 Draft Standard - http://whatwg.org/html5
The new pubdate
is an attribute for the new <time>
element when it exists within the new <article>
element. It allows us to be even more precise when presenting the date and time of publication.
In this recipe we'll build on the new <time>
element from the last recipe and add the new optional pubdate
attribute to display our publication date.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> <!--[if lt IE 9]><script src=http://html5shiv.googlecode.com/svn/trunk/html5.js> </script>[endif...