# Wednesday, 04 December 2013

HTML5 IS BIG

When I think of HTML5, I’m reminded of a quote about space by one of my favourite authors –Douglas Adams. “Space,” says Adams, “is big. Really big. I mean, you may think it’s a long way down to the chemist’s but that’s just peanuts to space.” And the reason this quote reminds me of HTML5 is because HTML 5 is big. Really big. I mean you may think it’s a long way… Well, you get the idea.

The point is that HTML5 is not just one thing. HTML5 is new tags and new attribute to existing tags and new allowed values for existing attributes and new rules about tags and attributes; It’s also a rich set of new JavaScript APIs to enhance your applications; In addition, a new version of Cascading Style Sheets (CSS3) , while not technically part of HTML5, was released at the same time also by the W3C, so we often discuss CSS3 along with HTML5 and I will do so in this paper.

HTML5 is a set of guidelines released by the World Wide Web Consortium (the “W3C” for short) with input from the most popular browser manufacturers, such as Microsoft, Google, the Mozilla Foundation, and Apple.

The browser manufacturers are implementing the HTML5 guidelines at their own pace and in their own order. Due to the enormous scope of HTML5 and the rate at which users tend to upgrade to new browsers, it is unlikely that HTML5 will be on all computers for another decade. Does this mean that HTML5 is irrelevant today? Of course not! Each browser manufacturer is working furiously to implement new features into their browser and encouraging users to upgrade to the latest browser.

You as a developer can start taking advantages of these features today. The challenge, of course, is to build a web application that will use features of new browsers, but still be useable if a user connects with an older browser that does not support the new features. This backwards compatibility is known as “graceful degradation”, meaning that your application downgrades itself gracefully rather than crashing when it encounters a degraded browser. We will talk about ways of making your pages and applications degrade gracefully throughout this paper.

HTML5 GOALS

The W3C had several goals when defining HTML5, including Simplicity, Semantic Markup, and ???

SIMPLICITY

HTML5 is simpler than earlier versions of HTML. For example, the mysterious document declaration at the top of each HTML document has been simplified from

<!DOCTYPE html PUBLIC 
    "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

to 

<!DOCTYPE html>

This new version is simple enough that we actually have a prayer of memorizing it.

The <LINK> and <SCRIPT> tag have been simplified. When was the last time you linked to a stylesheet that was not a CSS stylesheet or added client-side script in a language other than JavaScript? I suspect  attributes and assume every LINK tag points to a CSS stylesheet and every SCRIPT refers to JavaScript? That is what the new HTML5 standard does.

Old New
<link type="text-css" rel="stylesheet" href="MyStyle.css"> <link rel="stylesheet" href="MyStyle.css">
<script type="text/javascript" src="Myscript.js"> <script src="Myscript.js">

SEMANTIC MARKUP

Semantic markup refers to markup that provides meaning to the text it surrounds – meaning beyond simply show to display that text in a browser. This is an important concept as the web evolves from its original goal of a way to store, link, and share documents and pictures of cats.

Semantic markup existed to a lesser extent in earlier versions of HTML. For example, the tags <i> and <em> do the same thing visually when surrounding text: They tilt the top of each letter to the right. However, the <em> tag has some semantic meaning beyond simply telling the browser how to display text. The <em> tag indicates that the reason to italicize the text – With the <em> tag, the marked-up text is italicized to indicate that this text should be emphasized. When one reads the text aloud, one’s voice should rise a little louder or higher to indicate this emphasis. A similar case can be made for the tags <b> and <strong>.

HTML5 | Web