In the simple HTML form, the data will be submitted as is.A consideration of these typical scenarios will help us to appreciate the addition of the new HTML5 form input features.With regard to the new input types, take a look at the new methods and attributes of the form element that can be queried from code, as shown in Figure 10. The object contains useful read-only, Boolean attributes to provide what specifically was invalid or not.For example, the value Missing attribute will return true if the input was required.To answer the "browser support" question, I will first acknowledge what browsers I used to support the examples in this article: Internet Explorer (IE) 10.0 (Platform Preview) and Google Chrome (14.0).Although other modern browsers also support many of the new form features, I wanted to keep the focus primarily on the "what and how," not on the "where." As browsers (and standards) continue to evolve, we will have plenty of opportunities to learn about varying implementations.What would be the advantage of using these new input types instead of text? Applying a more specific type than text to form data gives parsing engines a better understanding of what the data means.The other advantages all lie in the power of the browser, which raises a valid concern: What browsers support these new features?
What if there were no way for a user to interact with a site by providing personal data?Using the same data input, notice how the browser responds to the click of the Send Data button in Figure 5.As you might suspect, the input asking for a site URL will give a similar validation message if the data isn't entered properly (i.e., the URL must begin with For example, consider the same form containing data entered by a user, as shown in Figure 3.When the user clicks the Send Data button, will the data entered be valid according to the requirements of the web developer?