Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
In many instances, developers turned to authoring environments such as Flash, Flex, and Silverlight, to compensate for HTML's shortcomings. The HTML5 specification attempts to address those shortcomings by introducing several tags that will assist developers in building applications natively in HTML. Some of these tags are focused on interactivity, others give new form controls, and still others allow the formatting and markup of data types necessary for modern web applications. First, I want to talk about the meter and progress tags.
There has been some confusion about the two and even some discussions about only having one of them in the finished specification. They are, however, quite different. Here's what the specification has to say about the meter element. The meter element represents a scalar measurement within a known range or fractional value. For example, disk usage, the relevance of a query result, or the fraction of the voting population to have selected a particular candidate. This is also known as a gauge. Now here's what it has to say about the progress element.
The progress element represents the completion progress of a task. The progress is either indeterminate, indicating that progress is being made but that it is not clear how much more work remains to be done before the task is complete, or the progress is a number in the range zero to a maximum, given the fraction of work that has so far been completed. Now, as you can see, both elements are going to allow you to represent data visually, but with a few differences. The meter element is designed to display results within a determined range. It shouldn't be used unless both the minimum and maximum values are known.
The progress element on the other hand will be used when you need to display the current progress or completion of a task. So while the two elements are similar, they're clearly designed for very different purposes. Next up is the time element. The time element allows you to markup time and date information in a machine-readable way that will make it easy for pages to share information with items such as calendars, social applications, and data feeds. The HTML5 specification states the time element represents either a time on the 24-hour clock, or a precise day in the proleptic Gregorian calendar, optionally with a time and a time zone offset.
The element is intended as a way to encode modern dates and times in machine-readable way so that, for example, user agents can offer to add birthday reminders or scheduled events to the user's calendar. The time element also contains attributes such as pub date that help give further definition to the date and time. There's ongoing debate about the time element that may result in a change in the final specification. Currently, the time element can only markup time in the Gregorian calendar format, which will limit any dates before the calendar.
The time and date information is also restricted to very specific formatting requirements. Referring to April of 2001, for example, is not allowed. The details element is one of my favorite new elements, even though no browser has offered support for it as of yet. As the specification states, the details element represents a disclosure widget from which the user can obtain additional information or controls. Simply put, creating an accordion or a tabbed widget structure could be as simple as enclosing the content in a details tag.
A new summary element allows you to provide a caption or summary for the detailed content as well. Obviously, there will be a lot of discussion regarding how the information should be hidden or shown, but I am really looking forward to seeing how this element matures. While not mentioned as much as some of the other elements, the command element will be a huge addition to any application developed with HTML5. The definition for it is short and sweet. The command element represents a command that the user can invoke. Attributes allow you to customize the look of the command through the use of icons.
They allow you to change whether the command is a toggle or if it's one of a grouping of commands and whether the command should be disabled or hidden. Commands could be used to build toolbars, panel commands, or icons within an application. Now, it's not technically new, but the menu element has been brought back from the dead, so to speak. It was deprecated in HTML 4 but has found new life in defining menu structures within applications. As per the specification, the menu element represents a list of commands. Its attributes lets you specify a context menu, a toolbar, or a list of items that represent various commands.
There are of course many other mechanisms within the HTML5 specification that assist in building applications. Later on we'll examine how forms have been improved in HTML5 as well and how they can assist when developing interfaces with HTML5. By giving authors the interactive elements and controls most commonly used in building applications, HTML5 takes the radical approach of building the browser itself into an application platform. It should be quite interesting to see how this evolves over the course of the adoption of HTML5.
Get unlimited access to all courses for just $25/month.Become a member