HTML 5

From Wikipedia, the free encyclopedia

HTML (HyperText Markup Language)
File name extension .html, .htm
Internet media type text/html
Type code TEXT
Uniform Type Identifier public.html
Developed by World Wide Web Consortium
Type of format Markup language
Extended from SGML
Extended to XHTML

HTML5 is planned to be the fifth major revision of the core language of the World Wide Web, HTML. When HTML5 is expressed in XML, it is called XHTML5. The ideas behind HTML 5 were pioneered in 2004 by the Web Hypertext Application Technology Working Group (WHATWG). HTML5 was adopted as the starting point of the work of the new HTML working group of the W3C in 2007. The HTML working group has published the First Public Working Draft of the specification on 22nd January 2008.[1] The specification is ongoing work, and expected to remain so for many years.[2]

Contents

[edit] New markup

HTML5 provides a number of new elements and attributes (a.k.a. "markup") that reflect typical usage on modern web sites. Some of them are technically similar to <div> and <span> tags, but have a meaning, for example <nav> (website navigation block) and <footer>. Such tags would facilitate indexing by search engines and handling by small-screen devices or voice readers for the visually impaired.[citation needed] Other elements provide new functionality through a standardized interface, such as the <audio> and <video> elements.[3]

Some deprecated elements from HTML 4.01 have been dropped, such as the purely presentational element <center> whose effect can be handled in CSS.

[edit] New APIs

In addition to specifying markup, HTML5 specifies scripting application programming interfaces (APIs).[4] Existing Document Object Model (DOM) interfaces are extended and de facto features documented. There are also new APIs, such as:

  • Immediate-mode 2D drawing
  • Timed media playback
  • Storage
  • Offline
  • Editing
  • Drag and drop
  • Messaging/Networking
  • Back button management
  • MIME and protocol handler registration

[edit] Differences from HTML 4

Here is a cursory list of differences and some specific examples:

  • New parsing rules oriented towards flexible parsing and compatibility
  • New elements – section, video, progress, nav, meter, time, aside, canvas
  • New Input attributes – date/time, email, url
  • New attributes – ping, charset, async
  • Global attributes (that can be applied for every element) – id, tabindex, repeat
  • Deprecated elements dropped – center, font, strike

[edit] Error handling

An HTML5 browser should be flexible in handling incorrect syntax, in contrast to XHTML, where such errors must not be ignored. HTML5 is designed such that old HTML 4 browsers can safely ignore new HTML5 constructs. In contrast to HTML4, the HTML5 specification gives detailed rules for lexing and parsing, with the intent that different compliant browsers will produce the same result in the case of incorrect syntax.[5]

[edit] Ogg controversy

HTML5 introduces new ways of inserting sound and video in web pages with the <audio> and <video> elements. Previously, the specification recommended the use of Ogg formats Vorbis and Theora, but this recommendation was later removed[6] after Apple[7] and Nokia[8] had opposed the move. Opera Software and Mozilla have been advocates for including the Ogg formats into the HTML standard[9][10] and have included native decoding for these formats in their browsers.

On 11 December 2007, mention of the HTML5 specification was updated replacing the reference to concrete formats with a placeholder:[11]

Original Replacement
“User agents should support Ogg Theora video and Ogg Vorbis audio, as well as the Ogg container format” “It would be helpful for interoperability if all browsers could support the same codecs. However, there are no known codecs that satisfy all the current players: […] This is an ongoing issue and this section will be updated once more information is available.”

The removal of the Ogg formats from the spec has been criticized by some web developers.[12][13] In response to such criticism, WHATWG has cited concerns from influential companies including Nokia and Apple over the Ogg formats still being within patent lifetime and thus vulnerable to unexpected future patent challenges.[14] A follow-up discussion also occurred on the W3C questions & answers blog.

[edit] Background

17 October 2007 the W3C encouraged interested people to take part in a video on the web workshop, held 12-13 December. A number of global companies were involved, and their "position papers" can be found here. Among them, Nokia's paper states that “a W3C-led standardization of a 'free' codec, or the active endorsement of proprietary technology such as Ogg … by W3C, is, in our opinion, not helpful.”[8] Whether Ogg is proprietary is debatable; while the formats are clearly open, they are designed and maintained by an international organisation Xiph.org. Ogg has followed a path similar to many other formats of the Internet age, such as PNG and GZip. While Xiph.org controls and defines the Ogg format specifications and their reference implementations, it does not own any patents and cannot control use of the formats, and the formats are thus not proprietary to Xiph.org.

Maciej Stachowiak — an Apple developer working on WebKit — described the reasons Apple had for opposing the recommendation, in an email posted to the WHATWG list:[7]

  • Other codecs offer significantly better compression than Theora; large-scale providers will prefer them to save bandwidth costs.
  • Few — if any — hardware decoders are available for Theora. For mobile usage, software decoding is either unavailable or impractical due to power usage.
  • It is theoretically possible for a submarine patent to exist, possibly waiting for a “deep pockets” company like Apple.

Stachowiak also pointed out that the HTML specifications, traditionally, also failed to specify what referenced formats to use, leaving it to the market to decide.

There is agreement between the vendors that a “baseline” codec of some form is needed; a codec everyone will be able to access.[15] As well as Ogg Vorbis and Ogg Theora; H.261, H.264, AAC and MP3 were mentioned.[16] The three latter are unacceptable to Opera and Mozilla on both practical and ideological grounds. Ogg Theora is unlikely to be accepted by Apple and Nokia, which leaves H.261 and Vorbis. Unlike Theora, Vorbis is already in use by multiple very large corporations,[17] and offers quality comparable to AAC and MP3.

[edit] See also

[edit] References

  1. ^ HTML 5: A vocabulary and associated APIs for HTML and XHTML. W3C Working Draft 22 January 2008.
  2. '^Q: When will HTML5 be finished?A: “Finished” is a big deal… You'll be able to use HTML5 long before then. […] It is estimated by the editor that HTML5 will reach the W3C Candidate Recommendation stage during 2012.'[1]
  3. ^ IBM developerWorks New elements in HTML5: Structure and semantics
  4. ^ HTML 5 differences from HTML 4 - APIs W3C
  5. ^ WHATWG FAQ FAQ – WHATWG Wiki. WHATWG. Retrieved on 2008-02-25.
  6. ^ Hickson, Ian (10 December 2007). [whatwg] Video codec requirements changed. whatwg mailing list mailing list. Retrieved on 2008-02-25.
  7. ^ a b Stachowiak, Maciej (21 March 2007). [whatwg] Codecs (was Re: Apple Proposal for Timed Media Elements). whatwg mailing list mailing list. Retrieved on 2008-02-25.
  8. ^ a b Wenger, Stephan (28 November 2007). "Web Architecture and Codec Considerations for Audio-Visual Services". W3C Workshop on Video on the Web, December 12-13, 2007. Retrieved on 2008-02-25. 
  9. ^ PC World - Mozilla, Opera Want to Make Video on the Web Easier
  10. ^ Opera <video> release on Labs - Opera Developer Community
  11. ^ html5.org
  12. ^ rudd-o.com
  13. ^ Abbadingo » Blog » Removal of Ogg Vorbis and Theora from HTML5: an outrageous disaster
  14. ^ Hickson, Ian (11 December). Re: [whatwg] Removal of Ogg is *preposterous*. whatwg mailing list mailing list. Retrieved on 2008-02-25.
  15. ^ Lie, Håkon Wium (22 March 2007). Re: [whatwg] Codecs (was Re: Apple Proposal for Timed Media Elements). whatwg mailing list mailing list. Retrieved on 2008-02-25.
  16. ^ Stachowiak, Maciej (11 December 2007). Re: [whatwg] Video codec requirements changed. whatwg mailing list mailing list. Retrieved on 2008-02-25.
  17. ^ Parker, Conrad (11 December 2007). Re: [whatwg] Video codec requirements changed. whatwg mailing list mailing list. Retrieved on 2008-02-25.

[edit] External links