HTML 5. Shiny new elements!

by Matt 14. August 2007 10:00

Just when you thought you knew HTML, they've gone and announced HTML 5.

It looks like they're running with some of the Semantic Web ideas, and have added elements specifically designed to give semantic meaning to parts of a web page. My particular favourite is the <time> element. I've wanted something like this for ages. Currently, when you put a time on a web page, the reader generally has no idea when it is. E.g. what time is 9.50? Is that AM? What time zone? Similarly, is 01/02/2007 February 1st (of course it is) or the 2nd of January? And look at all those blog posts, every one of them with a date and time on them.

Anyway, the <time> element wraps around a bit of text (such as "Sunday") and in the attributes can provide an exact date, time and time zone. The only downside is that there isn't a recommended rendering for the element. Indeed, the browser should probably just render the content of the element, so perhaps the actual date and time (preferably translated to local time) would be available as a tooltip? But that's not very discoverable, is it?

Interestingly, this won't break compatibility with existing browsers because a downlevel browser will ignore the element and just render the content.

But the real question is, why do we need this? The microformats movement have been embedding semantic meaning into web pages via the use of CSS class attributes for ages. Take a look at this example:

<abbr class="dtstart" title="20070501">May 1st 2007</abbr>.

Does exactly the same as the <time> element. There's a good comment further down that page that claims this is bad for accessibility reasons - screen readers will read out the title attribute of the abbreviation element for clarity. But then it's easily fixed by simply using a <span> element.

So, HTML5 and Microformats. Which is Betamax, and which is VHS?


Comments (12) -

best suv
best suv
7/20/2011 10:33:36 PM #

Hi,what an excellent article this is,I found it on bing and I like it very much,I agree with what you have said, lots of things will be learned form your site,but I still have some questions with the last part,can you explain it for me ?I will appreciate your answer,and I will be back again!


luxury car
luxury car
7/22/2011 1:35:22 AM #

Per il tuo bambino scegli Moncler. Una scelta di capi, estivi ed invernali, eccezionali. Tuo figlio sarà sempre alla moda e potrà muoversi in totale comodità.


best free ipad apps
best free ipad apps
7/24/2011 3:41:40 AM #

hi!,I like your writing so so much! proportion we communicate extra about your post on AOL? I require a specialist in this area to unravel my problem. May be that's you! Taking a look forward to see you.


burberry outlet
burberry outlet
9/19/2011 3:01:57 PM #

Burberry Prorsum 2012 spring and summer men's clothing show which Global synchronous video live. You can experience the charm of digital technology of Burberry again, and you also can carefully appreciate the new works of design director Christopher Bailey!
<a href=""; >burberry bags</a>  <a href=""; >burberry outlet</a>  <a href=""; >burberry outlet online</a>  <a href=""; >burberry belt</a>


philix United States
11/19/2015 7:26:51 AM #

Nice Site.


Myron Roeske
Myron Roeske United States
1/15/2016 4:56:57 AM #

this is awesome like the book of awesome


Chang Carbonneau
Chang Carbonneau United States
1/15/2016 4:58:54 AM #

Congratulations on your success! You deserve it for brightening all of my work days with something to be excited about.


Christin Boxwell
Christin Boxwell United States
1/15/2016 7:48:59 AM #

Congratulations, Neil! I love this site and I know I'll love the book. Christmas, birthdays, Father's Day 2010  check!


Walter Rigsbee
Walter Rigsbee United States
1/15/2016 8:31:11 AM #

Thaaaat IS awesome! lol hehe


Hank Orefice
Hank Orefice United States
1/15/2016 8:54:32 AM #

yeah, except the "dolphin saving you" one


Angelika Sotak
Angelika Sotak United States
7/21/2016 5:31:01 AM #

I think this is interesting and do not see posted often. This is great information.


After I initially left a comment I appear to have clicked on the -Notify me when new comments are added- checkbox and from now on every time a comment is added I get 4 emails with the exact same comment. There has to be an easy method you can remove me from that service? Thanks!


Add comment

  • Comment
  • Preview


Month List


Comment RSS