O'Reilly logo

The Definitive Guide to HTML5 by Adam Freeman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

C H A P T E R  13

Customizing the Input Element

In the previous chapter, I showed you the basic use of the input element, which produced a simple text box in which the user can enter data. The problem with this approach is that the user can enter any data. This can be fine in some situations, but in other cases you might want a specific kind of data value from the user. In such cases, you can configure the input element to collect data from users in different ways. You configure the input element through the type attribute, for which there are 23 different values in HTML5. After you have selected the type value you want, you have access to additional attributes. There are 30 attributes available for the input element in total, and many of these ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required