O'Reilly logo

HTML5 Multimedia Development Cookbook by Lee Jordan, Dale Cruse

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Specifying the pubdate of an article

"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

Getting ready

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.

How to do it...

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required