Html5 Tutorial : Index
- Successor of HTML 4.01 and XHTML 1.1
- It comes with new tags, features and APIs
Below is a non exhaustive list of features that tend to be labelled as "HTML5" in the medias:
-
New structural elements (
<header>,<footer>,<nav>and more) - Forms 2.0 and client-side validation
-
Native browser support for audio and video (
<video>,<audio>) - Canvas API and SVG
- Web storage
- Offline applications
- Geolocation
- Drag & Drop
- Web Workers
- New communications API (Server Sent Events, Web Sockets, …)
![[Note]](../images/note.png)
Note However, a precision needs to be given on that list: Some features were in the past in the same specification as the HTML5 specification but now have their own specification such as Web Sockets, some other features were never related to HTML5 such as Geolocation but all of these features in the end tends to be labelled "HTML5" since they are going to help us building great web applications!
-
New structural elements (
- HTML5 brings also more clarification and standardizes many features that were used before by adding more documentation
HTML5 is not so new, it has a lot of background history. It almost happened that it could not exist. Major actors have been involved in its history with a lot of discussions, conflicts and different concerns.
- December 1997: HTML 4.0 is published by the W3C (recommendation) and the first HTML working group is closed
- February - March 1998: XML 1.0 is published (recommendation). Mozilla.org is launched
May 1998: A W3C workshop, "Shaping the Future of HTML", came out with the following conclusion:
In discussions, it was agreed that further extending HTML 4.0 would be difficult, as would converting 4.0 to be an XML application. The proposed way to break free of these restrictions is to make a fresh start with the next generation of HTML based upon a suite of XML tag-sets.
-- W3C Working Group http://www.w3.org/MarkUp/future/ - December 1999 - January 2000: ECMAScript 3rd Edition, XHTML 1.0 (Basically HTML tags reformulated in XML) and, HTML 4.01 recommendations are published
- May 2001: XHTML 1.1 recommendation is published
August 2002: XHTML 2.0 first working draft is released. We clearly see that the main effort of the W3C so far aimed to have web pages strict and valid. Some web notable make a point on that, as Mark pilgrim says in its blog post:
… I’m building a parser that will be used in an end-user product, and end users don’t care about RSS or XML or XSLT or standards of any kind. Nor should they care, nor should they be required to care. Look at it this way: imagine you made a browser that only rendered sites authored in valid HTML or XHTML. How much of the web would your users be able to see? 1%? 0.1%? Less? …
-- Mark Pilgrim http://diveintomark.org/archives/2002/08/20/how_liberal_is_too_liberal - December 2002: XHTML 2.0 second working draft published. Some web notables do not agree with the W3C, as Daniel Glazman wrote in a W3C mail list: http://lists.w3.org/Archives/Public/www-html/2003Jan/0125.html
- June 2004: W3C workshop on "Web Applications and Compound Documents". Major web actors were present. Among them, the Mozilla Foundation and Opera Software gave their vision on how the future web should be (http://www.w3.org/2004/04/webapps-cdf-ws/papers/opera.html). Their proposition was voted down. This will lead to the creation of the WHAT Working Group.
October 2006: Tim Berners-Lee, founder of the W3C, announce that the W3C will work with the WHAT Working Group together in order to evolve HTML:
Some things are clearer with hindsight of several years. It is necessary to evolve HTML incrementally. The attempt to get the world to switch to XML, including quotes around attribute values and slashes in empty tags and namespaces all at once didn’t work… The plan is to charter a completely new HTML group. Unlike the previous one, this one will be chartered to do incremental improvements to HTML, as also in parallel xHTML.
-- Tim Berners-Lee http://dig.csail.mit.edu/breadcrumbs/node/166 - January 2008: First W3C working draft of HTML5 is published!!
- Stands for World Wide Web Consortium
- Founded and lead by Tim Berners-Lee
- Internationally main responsible of standards for the World Wide Web
Any W3C Document goes through the following maturity levels until becoming a recommendation:
- Working Draft (WD)
- Last Call Working Draft
- Candidate Recommendation (CR)
- Proposed Recommendation (PR)
- W3C Recommendation (REC)
- Stands for Web Hypertext Application Technology Working Group
- Founded in 2004 by individuals from Apple, The Mozilla Foundation, and Opera Software due to a concern about W3C vision of the web
- Anyone can contribute for free: http://wiki.whatwg.org/wiki/What_you_can_do
- Current editor is Ian Hickson (almost considered as the father of HTML5)
- Until they joined their force with the W3C in 2006 they were the only one working on what we know as the HTML5 specification
- Subscribe to the mailing list: It is a great way to learn, to contribute and be informed
- The HTML Working Group has published a "HTML Design Principles" (http://www.w3.org/TR/html-design-principles/)
- It applies to authors as well as implementors
- Let us go through each of these principles
Support existing content
- User-agents should be able to deal with old content containing deprecated tags and attributes
Degrade gracefully
- For instance, there are ways to test if a HTML5 feature is available or not. If not, provide a fallback
Do not reinvent the wheel
- When possible, use features that exist and work rather than spending time implementing new ones
- Pave the cowpaths
Evolution not revolution
- Old content should be able to use new features without the need to make unrelated changes
Solve real problems
- When possible, specifications must be aimed to solve existing problems that the web is facing
Priority of constituencies
In case of conflict, consider users over authors over implementors over specifiers over theoretical purity…
-- http://www.w3.org/TR/html-design-principles/ Secure by design
- New features should be secure. A good example of that is the concept of "same origin" that will be discussed later in this course
Separation of concerns
HTML should be used for structuring content. Use CSS to present the content
![[Note]](../images/note.png)
Note Here for example are some of the presentational tags that have been removed in HTML5 like
<font>,<center>, etc… It is deprecated now to use these tags but user agents still have to support them
DOM consistency
- The produced DOM tree of a web page should be the same on different browser. It is very important for scripts that work against the DOM tree
Well-defined behavior
- Behavior of tags should be clearly defined in order to run the same way in different user-agents
Avoid needless complexity
- Features should be as simple as possible, easy to be implemented and easy for web developers to understand.
Handle errors
- We do not want end-users to be exposed to hard failure in case of errors from web developers. These web developers should prefer graceful error recovery to hard failure
Media independence
Features should, when possible, work across different platforms, devices, and media.
-- http://www.w3.org/TR/html-design-principles/ Support world languages
- Authors should be able to publish their web site in any languages
Accessibility
- Features should be designed in a accessible way to users with disabilities
-
For instance, blind users cannot see
<img>this is why there is thealtattribute that can be read by browser with assistive technology.
- At the time of this writing, the current HTML5 Working Draft is from April 11th, 2011
- Candidate Recommendation is planned for 2012 while Proposed Recommendation is planned for 2022
- 2022?!? You might be asking yourself why will this take so long? or can I start using HTML5?
HTML 4 might have reached recommendation levels but:
- There is no real test suite
- Some parts of the specification do not even have real implementation
- Some parts of the specification are not fully documented
- Big parts are not interoperable
Thousands of known errors have not been fixed
![[Note]](../images/note.png)
Note Nowadays, there are more expectations for a specification to become recommendation. So do not worry about 2022.