Home > Articles > Web Development > HTML/CSS

  • Print
  • + Share This
This chapter is from the book

HTML5 and Web Standards

Over the past two decades, HTML has evolved through several iterations—HTML, HTML2, HTML3, HTML3.2, HTML4, HTML4.1, XHTML. These changes have been driven by both standards-setting organizations, such as the W3C, and individual software companies, such as Netscape and Microsoft. HTML5 is the next iteration. Technically, it is not yet a standard, and it will not be for several years. It is the W3C's working draft for the standard that it will eventually recommend to official standards organizations around the world. Still, browser manufacturers are already adopting HTML5 features.

For now, HTML5 is best thought of as a directional guide to good standards of practice in Web design. New HTML5 elements and attributes provide a richer description of online documents as interactive multimedia spaces. Prior HTML versions (HTML4 and XHTML) are tied to a print metaphor of a page to which interactive capabilities and media support have been added ad hoc. Many pages on the Web are the online equivalent of printed pages. In contrast, HTML5 encourages a broader conception of the Web as a unified, intelligent, interactive, hyperlinked medium.

For online document authors, HTML5 adds new elements to define document sections (the section element) and new section subelements to define page headers (header) and footers (footer). Section headings can be composed of heading groups (hgroup) and can contain the new navigation (nav) element. HTML4 provided only a single division element (div) for these purposes, and coders used id and class attributes to make the distinction in usage. There is a new article element (article) and a means (the aside element) to designate text that's tangential to the main topic. There is even an element for indicating sarcastic remarks (sarcasm) in the W3C draft specification, but I think this is an inside joke.

For Web developers, the HTML5 draft specification for the first time describes how the browser should expose HTML elements to scripts. Using JavaScript syntax, it describes the methods that scripts may call on document objects. In other words, it describes what commands a given HTML element understands and obeys. Previous HTML specification referred generally to ECMAScript, a standardized family of languages that includes JavaScript, JScript (Microsoft's version of JavaScript), and ActionScript (Adobe's scripting language for Flash). The use of JavaScript in this book is not meant to imply the exclusion of other scripting languages.

Equally exciting is the new HTML5 canvas element. It provides a bitmap canvas area that scripts can draw on or load images and video into. A canvas element can be used to render graphs, game graphics, or other visual images on-the-fly. There are also new elements for creating meters (meter) and progress bars (progress). There are also new element attributes that allow parts of a document to be moved around the page or edited in place and saved across sessions.

Even with all these new features, HTML5 emphasizes simplicity. This is achieved by segregating the description of document content from the descriptions of presentation and interactive behavior. Web authors are encouraged to code the minimal HTML necessary to provide a semantic description of a document. This is what Web Standards is all about: the standards of practice that create web pages that display well on all devices and that are pleasing to everyone and everything that reads them.

Allow me to expand on this last point. Search has changed how we use the Web. Although a work must be read and understood by people, it is just as important that the information to help people find that work be properly constructed. In other words, a web page must be both robot-friendly and people-friendly.

This dictum of being friendly to everything (within reason) goes beyond just being browser- and robot-friendly. The Web embraces all kinds of devices, including phones, tablets, netbooks, computers, game consoles, and large public video displays, as well as devices for the visually handicapped. The Web also embraces all languages and writing systems, including right-to-left languages such as Hebrew and Farsi and ideographic character sets such as Japanese and Chinese.

We are entering the age of the collaborative Web. It is important to think about pleasing the coauthors, contributors, curators, archivists, and translators who will work with your documents long after you write them.

  • + Share This
  • 🔖 Save To Your Account