The second day of IWMW10 kicks off with Patrick Lauke – he is currently ‘Web Evangelist’ at Opera, and was previously web manager at University of Salford. Slides at http://www.slideshare.net/redux/html5-and-friends-institutional-web-management-workshop-2010
HTML5 is a huge topic – Patrick wants to try to answer the question today ‘should I use HTML5 today?’
HTML5 is a ‘woolly’ term – people use it to encompass lots of technologies. However, Patrick is going to concentrate on the ‘core’ HTML5 – not talking about other technologies that often get lumped into the HTML5 bucket (example he gives is geo-location services – not part of HTML5, but often referred to when people talk about HTML5) – HTML5 without the hype.
Why are we back talking about HTML – weren’t we all going to be using XHTML? XHTML 1.0 came out in 2000 – idea was to move to xml base. Started to see development of XML based technologies – related to te web – e.g. XForms. At Opera they liked the functionality of XForms, but wanted to be able to introduce the same ideas to older sites, still using non-XML based sites – and came up with Web Forms 1.0
In 2004 W3C started to focus on XHTML 2.0 – but this was not backwards compatible – and browser companies not happy. So Firefox, Opera and Apple (Safari) worked together as the ‘Web Hypertext Application Technology Working Group’ (WHATWG). Eventually W3C proposed bringing the work done by WHATWG back into W3C development – stepping back from XHTML. So in 2007 a W3C working group for HTML5 was setup (including browser vendors)
Quote from Ian Hickson (Google) who is Editor of HTML5 says HTML5 is about “extending the language to better support Web applications [...] This puts HTML in direct competition with other technologies [...], in particular Flash and Silverlight.”
Patrick says HTML5 does not replace HTML 4.01 (or XHTML 1.0) – just extends the languages. In general if you have a valid HTML 4.01 website, simply changing the doctype will result in a valid HTML5 webpage (with some minor tweaks maybe).
HTML5 specification is aimed at browser developers – so if you aren’t a browser developer you don’t want to look at it. For authors rather look at ‘HTML5 differences from HTML4‘. HTML5 standardises current browser and authoring behaviour – previously there has been a lot of inconsistency in how different browsers deal with different code.
HTML5 doctype just says it is html – doesn’t include a version etc. So just use <! DOCTYPE html> – in reality this is all the browsers use generally anyway.
HTML5 doesn’t care about some of the xml conventions – use of lowercase for tags, double quotes in attributes, closing empty tags. Patrick emphasises some of these things can still be good practice – but HTML5 doesn’t care about them.
HTML5 looked at the most commonly used names for <div> tags, and transformed them into elements – so now a <nav> tag can be used instead of <div class=”nav”> for navigation – also for <header> and <article>.
HTML5 introduces <video> element for embedding video – allows specification of basic player information – like size, whether controls display etc.
However, still a big debate about video formats – H.264/MP4 – supported by Chrome, Safari and IE 9 – but there are patent issues – and worries that this could lead to royalty coming down the line. Firefox and Opera support Ogg Theora – no patent/licensing issues but not very many tools for Ogg Theora – very geeky still.
New video standard started by Google and released free without patent/licensing issues – WebM – supported by most major browsers, but IE needs codec installed, as would Safari (unspoken but implication Apple are the barrier to agreement on WebM adoption?). However you can specify a cascade of different video formats in the <video> element – so basically ‘use WebM if browser can, otherwise use Ogg, otherwise use H.264 etc.
Is HTML5 a ‘flash killer’? Patrick says too early to talk about HTML5 replacing Flash – but HTML5 introduces choice – look at the tools, and what you want to do.
Should you use HTML5 today? Patrick says, if you want to make use of the tools – yes, but otherwise you don’t need to rush. However, you could just try changing the doctype – you might already have a valid HTML5 site.
Q & A
Q: How does HTML5 work with/relate to RDFa?
A: Working group looking at this. Also Patrick mentioned something about ‘microdata’
Q: Why is there not a <content> tag
A: Good question – Patrick says some of the decisions on tags are slightly odd – e.g. <article> not going to be relevant in all cases
Q: How secure is HTML5 for copyright material?
A: It is an issue – for e.g. easier to grab video because it is just referenced in the HTML code. YouTube are experimenting with HTML5 but have said they won’t use it for some types of video – e.g. those with adverts in them, because people could easily write something to skip the ads and go straight to the content – so loss of control over this is an issue. But then, there is no good way of protecting the content generally