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 can be used with only certain type values. I’ll explain all of the different types and the associated attributes in this chapter. Table 13-1 provides the summary for this chapter.
KeywordsAdditional Attribute Option Element Input Element Input Validation Radio Button
Unable to display preview. Download preview PDF.