Even when many of these attributes aren’t fully supported by most browsers, their future looks pretty bright indeed. With a little willpower and careful planning, you can start using them right now on your web pages without feeling guilty, as many of the attributes will be gracefully degraded to a common text box in the event that the browser fails to parse them properly.
In the introductory part of this tutorial (HTML5 Form Elements) I coded a few examples that demonstrated how to use the “placeholder”, “autofocus”, “email” and “url” attributes, in order to extend the basic functionality of a web form, either by adding a descriptive label to a given field or by specifying that the field in question must be filled in with a valid email address or URL.
It’s fair to note that aside from the ones just mentioned, HTML5 packages some other handy input attributes. With that in mind, in this last tutorial I’ll be showing how to enrich the functionality of a web form with the “number”, “range”, “search” and “required” attributes.