Home > Articles > Web Development > HTML/CSS

  • Print
  • + Share This
Like this article? We recommend Forms and Interfaces

Forms and Interfaces

XHTML 2 tried to remove HTML forms and substitute XForms instead. HTML 5 goes in the opposite direction, and makes a few more elements available for forms. One of the most frequently-requested is the combo box—a feature of most graphical user interfaces for at least two decades, but one with no current standard HTML representation. Another is the progress indicator. These two are both commonly created with JavaScript at the moment, but moving them into HTML means that they can be rendered with the host platform's native widgets, which should make web forms that use them look and feel a bit better. It's quite jarring to come to fill in a web form on OS X that uses the standard widgets and then come to a combo box that the web developer decided to copy Windows widgets to produce in JavaScript.

There are also now standard form elements for entering dates, times, telephone numbers, URLs, and colors. As always, it's up to the browser as how these are displayed. This could be as simple as restricting input to a valid representation in the user's locale, or more complex such as providing a graphical calendar or color well for selection.

The Future

The development model adopted by WHATWG is considerably better than the W3C's attempt. Every feature, to be included with HTML 5, must fill a demonstrable need and must have been implemented by at least two browsers. This was roughly the approach used with HTML 2 and 3.2, which were both successful. Because the spec is being developed incrementally, with some parts being finalized before others, browser and website developers are free to begin deploying the stable parts before the full thing is finalized.

Parts of HTML 5 are here already, at least in some browsers, and it seems reasonable to expect that this support will continue to improve. As always, be careful when you implement anything from a specification that isn't finalized. If you read the HTML 5 draft online, you get a nice floating indicator on the left side, flagging parts of the specification that are still not well-supported or are controversial. By all means, use these in testing sites or on the Internet with some fall-back code for when they are not supported, but don't rely on their existence.

  • + Share This
  • 🔖 Save To Your Account