HTML5 Guidelines for Web Developers

(coco) #1
1.3 In Medias Res 9

1.3 In Medias Res


After the preceding brief trip through the history of HTML5, the time has come
to finally tackle the elements and attributes of HTML5 directly. What could be
more appropriate than the classic Hello world! example? This is what it looks like
in HTML5:


<!DOCTYPE html>





Hello world! in HTML5


Hello world!




Every HTML5 document begins with the document type declaration <!DOCTYPE
html>, and it does not matter if you write it in uppercase or lowercase. The sec-
ond innovation you will notice is the shortened way of specifying the encoding—


. The rest, like html, head, title, or body, you will be fa-
miliar with from HTML4, which leads us to the question: What is really new in
HTML5?

1.3.1 What Is New?


The W3C provides the answer with the specification HTML5 differences from
HTML4, moderated by Anne van Kesteren. In addition to lists of new and ob-
solete elements and attributes, we can also find tips on new or changed APIs,
external parts of the specification, and finally the HTML5 Changelog, which logs
in chronological order how and when individual features have found their way
into or out of the specification: http://www.w3.org/TR/html5-diff/.


The tables contain a lot of detail, but do not give us a very clear overview. Four
wordles are therefore going to guide us through this chapter. They were all cre-
ated using Jonathan Feinberg’s Wordle Applet, which is available free of charge
at http://www.wordle.net. The frequency of the relevant terms is reflected by
the size of the letters for new elements and attributes, and determined by the
number of cross-references connected to the relevant feature in the HTML5
specification. For obsolete elements and attributes, the font size corresponds
to the frequency of online use, as researched by Opera within the MAMA project
What is the Web made of? (http://dev.opera.com/articles/view/mama).


Let’s first take a look at the new elements in the wordle in Figure 1.2. Highlights
are definitely the media types video, audio, and canvas—the latter is, simply put,

Free download pdf