HTML5, round 4: Other tags, accessibility
While HTML5 has a nice amount of new tags for semantic markup as well as media-based tags such as <video>, <audio>, or the JavaScript-based <canvas> tag, there are a handful of other new elements that are still worthy of mention:
- <command> is used to define a button, such as a radio button, or check box. It must be used inside of a <menu> element.
- <article> is used to define an article from an external source – news site, blog, forum, etc.
- <datalist> defines a list of options, such as a drop-down menu. This tag is used in conjunction with the <input> tag.
- <dialog> is used to define a dialog or conversation.
- <embed> defines external content or plugins. This element has been used in previous HTML versions but is now re-introduced as an HTML5 standard.
- <figure> is used to represent flow content, separate from the primary content of a document. Additionally, the <figcaption> element is used within <figure> in place of the older <legend> element.
- <meter> is used to define a scalar measurement within a known range. For example, think of this as a representation of a “2 out of 10″ score.
- <time> represents time on a 24-hour clock, or a date in the proleptic Gregorian calendar.
- <source> is used in conjunction with the new media elements, <audio> and <video>, to define multiple source files.
- <ruby> defines a ruby annotation – Chinese notes or characters. <rt> is a child of <ruby> and is used to define the explanation of the ruby annotation. <rp> is used for browsers that do not support ruby annotations.
- <mark> represents a run of text in a document that has been marked or highlighted due to its relevance in another context. This new element is similar to the existing <strong> and <em> elements, though it is only used in terms of relevance and not importance or emphasis.
- <progress> defines the completion amount of a task. This could be used to display the download progress of an object.
- <keygen> represents a key pair generator control. When the control’s form is submitted, the private key is stored in the local keystore, and the public key is packaged and sent to the server.
- <output> defines the result of a calculation, such as output written from a script.
- <details> is used to show details about a document, or parts of a document. A user can obtain information or controls from this element. <summary> is a child element to show the summary/control of the <details> element. Think of this as an expanding area where the summary is a cickable link to “See more information.”
- <hgroup> is used to group a section of headings (<h1> – <h6>) when there are multiple levels of headings (primary heading, subhead, tagline).
The HTML5 standards draft is not 100% finalized as of the publish date of this post but is close to completion. The current draft of the proposed new standards can be viewed at http://dev.w3.org/html5/spec/Overview.html.
HTML5 will be a great thing, once supported enough across the spectrum of browsers. Until then, only some of the new elements can be utilized in common practice. Internet Explorer will certainly not understand how to render CSS on a majority of the new elements, but there is a means to force IE to read and accept the elements by means of JavaScript so CSS styles can be applied.
Something as simple as document.createElement(‘section’); will tell IE to render the <section> tag. While this method has been tested, and does work for a majority of the new HTML5 elements, there is still the issue of accessibility. Given that JavaScript must be used for IE to render the elements, it cannot be relied upon as a common practice in HTML development. If a user does not have JavaScript enabled on their browser, it will completely break a web page using this method. It is therefore safe to say that we will not see most of the new HTML5 tags used in general development until we at least see the death of Internet Explorer 6 and possibly IE7 and IE8.




