Monday, May 3rd, 2010

HTML5 Extensibility: Here comes the Semantic Web! ;)

Category: HTML

<>p>Mark Pilgrim continues to create fantastic content for his Dive Into HTML5 book. His latest is on HTML extensibility.

Some folks tried to get us to use RDFa in XHTML (and try to get us doing it in HTML5 too… :/), and we have had the micro-formats folks take a pragmatic approach.

The new microdata work in HTML5 formalizes some of this, as you can see in this fully marked up ‘person’:

  1. <section itemscope itemtype="http://data-vocabulary.org/Person">
  2.     <img itemprop="photo" class="me" width="204" height="250"
  3.         src="http://diveintohtml5.org/examples/2000_05_mark.jpg"
  4.         alt="[Mark Pilgrim, circa 2000]"/>
  5.  
  6.     <h1>Contact Information</h1>
  7.     <dl>
  8.       <dt>Name</dt>
  9.       <dd itemprop="name">Mark Pilgrim</dd>
  10.  
  11.       <dt>Position</dt>
  12.       <dd><span itemprop="title">Developer advocate</span> for
  13.           <span itemprop="affiliation">Google, Inc.</span></dd>
  14.  ....

For the history, the present, and the future… give Mark’s post a good read.

Related Content:

Posted by Dion Almaer at 5:16 am
5 Comments

++++-
4.7 rating from 3 votes

5 Comments »

Comments feed TrackBack URI

What do people here think about this syntax:


<head profile="http://example.org/profiles/haudio.html">
...
<div typeof="haudio">
<span property="fn">Start Wearing Purple</span> by
<span property="contributor">Gogol Bordello</span>
</div>

It may surprise some people, but this is actually valid RDFa. Why choose between microformats and RDFa, when you can have both? If your needs ever move beyond microformats, you can simply add the richer stuff without changing what you’ve already got. Equally, other developers using linked data can easily link your information in; increasing the long-term value of what you’re doing.

I don’t see that the example given in the article has any real benefit over RDFa, given the support for profiles and terms in RDFa 1.1, and it has the drawback that it reinvents the wheel.

Comment by jgeldart — May 3, 2010

Way to go Mark! This is truly a gift to the web development community.

Encoding microdata is fun, but another exciting part of the HTML5 Microdata specification is the DOM API to extract microdata from a page. This API paves the way for JS libraries to easily extract and provide alternate representations of the microdata. It’s exciting.

Comment by ndluthier — May 3, 2010

Ugly as hell.

I will never use such abomination.

Comment by Ajaxerex — May 3, 2010

@Ajaxerex: I think you’re being a bit dramatic. What’s so ugly about it?

Comment by MattCoz — May 3, 2010

Microformats 2.0? Is it generally accepted that this will be the HTML5 implementation of Microformats?

Comment by RoryH — May 4, 2010

Leave a comment

You must be logged in to post a comment.