Sunday 20 July 2008

HTML 5, The Future of the Web

Since 2004, the WHATWG independent working group works with the definition of a standard format for Web pages intended to replace both HTML 4 and XHTML, while keeping a partial compatibility with them.And that tends to eliminate from the scene the new XHTML 2 format on which sorrow the W3C, as well as proposals of standards on forms. In fact that goes much further as you will see!

The HTML 4 last specification was published in 1999 and since this date, the W3C turned to XHTML. But XHTML 2 causes the discord, in addition to the fact that it is incompatible with previous standards, one reproaches it its pure document orientation whereas the Web becomes 2.0 and needs more and more applications and uses various media.From this opposition in 2004, an independent group supported by Apple, Mozilla and Opera is born, the WHATWG (Web Hypertext Application Technology Working Group) which undertakes the definition of a successor for HTML.On March 3, 2007, the W3C announces that it restart the work on HTML to give it a successor. The new specification of the W3C has the same author as that of the WHATWG, Ian Hickson.

Overview

The new format is not any more a simple format of document, but also a support for current Web applications such as forum, etc and a purpose is to facilitate interoperability. It has two formats in one, HTML and XHTML 5, the first with a doctype, the second with only at the beginning the line .It integrates DOM Level 2 for HTML.Syntax is such as a page can be parsed as an XML document if it is designed for that, but it keeps incompatible characteristics from HTML, such that the tags without contents which end by ">" and not "/>" (both being supported).

Applications

HTML 5 is aimed at Web pages and Web applications. Moreover the definition was called Web Application 1.0 before changing name for being better posed as a successor to HTML 4.Some applications such as forums, wikis, purchasing systems, searching systems, e-mail clients, instant messaging clients, discussion software, online document editing, sites sharing resources, and Web 2.0 sites in general, are now popularized and require a format of document more adapted to that. Features of HTML 5 include graphics and images, which will make it possible to make animated pages, multiplayer online games.

Differences between HTML 4 and HTML 5

Even if the format is still in work, certain components are acquired. It is wise to know them because some practices should be adopted right now, such as suppression of frames.

Main differences

HTML 5 is compatible with HTML 4 and XHTML although some tags become obsolete. it can take two forms, a traditional one with HTML tags, the other in XML. It comprises new forms, support new media, and adds a support for drawing and images. The new format will integrate another specification in progress: Web Forms 2.0.

New elements

  • Canvas
    It is a background on which one can draw and thus new graphic elements may be added to the interface. It is inspired by the syntax and functions from Java.One can put several canvas in a Web page.On the canvas one can perform transformations as scaling, rotating, translating.Varied figures are available: rectangles, Bezier's curves, arc, with functions of filling and stroke. And also clipping on the edges of the canvas.
  • Audio and video
    The video tag allows embedding a video in the document. It is accompanied by a src attribute to indicate the file, but also by attributes like start, stop, auto play etc which define the behavior of the video. The audio tag is the equivalent for sound files.
  • Section
    The section tag makes it possible to divide (or subdivide) a document into semantic parts. They are used to create an outline, table of contents. The sections can be chapters. They differ from div tag which has a role of presentation. A section is completed with a header and footer.

Changed elements

  • a, optional href
    Removing href makes it possible to use the attributes of a on a dynamic link, in conjunction with onclick but without providing URL (the URL could be defined in a script).
  • script, the async attribute
    A script is by default executed at loading, while it will be executed at the end of parsing of the HTML page when the defer modifier is added. But if it is the async modifier that is present, then it is executed in an asynchronous way, therefore independently of the display of the page and according to the availability of resources, as Ajax.

Removed elements
The frames disappear. Consequently the tags frame, frameset, noframe are not any more part of the format.

A detailed list of the changes is provided on the wiki of WHATWG in Differences from HTML 4.

Will HTML 5 succeed to HTML 4?

Is HTML 5 a replacement for current HTML 4 language, standard of the W3C? The good point is that its definition is supported by major actors of the Web, Apple, Mozilla and Opera. However Microsoft does not support it, and its Internet Explorer browser is largely the most used. In addition the presence not declared but implicit of Google can have an equivalent weight. Because the author of the HTML 5 definition became employed of Google. Google does not have a Web application environment, it proposes on line software and the Google Gears tool which makes it possible to run Web applications without connection. The interest of Google is to ignore the operating system and to generalize the use of on line applications to the desktop station. Its interest is thus in HTML 5 while the interest of Microsoft would be to promote Silverlight with all background standards technologies from the company, as XAML.

HTML 5 or Silverlight?

In the 1.0 version, Silverlight is just Canvas. The 1.1 version is more complete but it is based on the .NET platform and cannot be regarded as a universal environment. Remain to know if

HTML 5 can be compared with Silverlight...

In fact the features of Canvas of HTML 5 are similar to those of Silverlight. Vectorial figures are drawn into and one add images in both cases. That opens the way to elaborate interfaces with animations and plays.The video and audio tags of HTML 5 have also equivalent in Silverlight and the two environments work with Ajax.About the function of off line use, essential for RIA (Rich Internet Application), Internet Explorer requires the Silverlight plug-in version 1.1, therefore least portable, while that will be integrated into the Firefox 3 browser or will be added to any browser by the Google Gears plug-in.According to the director or products, Google intends to work with the WHATWG for Gears becoming a standard integrated into browsers.
In conclusion the two environments are worth and are different by the programming style and the details.

The future

The portage of Safari on Windows moreover, consolidates us in the idea that one will own soon on one hand, of a series of browser supporting HTML 5 and giving access to new essential free Web applications and on the other hand, Internet Explorer, a second order browser confined to legacy websites which must be supplemented by Silverlight for the Web applications. Unless Microsoft does adopt the new format!

Conclusion

The failing of XHTML 2 and its limitations open the way to HTML 5 which not only improves HTML 4 and XHTML 1 but also is a response and an alternative to the Silverlight environment. W3C started the standardization of the new HTML. It will undoubtedly be a long time before it does become a recommendation, but the majority of its functionalities will be implemented by many browsers quickly, some even are already available.

More information

HTML 5 specification by the WHATWG. Written by Ian Hickson.
HTML 5 specification by the W3C. The W3C resumes work on HTML starting from the document of the WHATWG. Same author.
Web Forms 2.0. New format of forms which will be integrated into HTML 5
Canvas. Canvas is already implemented in Firefox and Safari. Tutorial and examples.

Content Source : http://www.scriptol.com/html5/html5.php

No comments: