A major part of the new HTML 5 specification is application development. With this, there have been significant upgrades to HTML form elements with the introduction of version 5. Form fields have been fitted with new attributes and functionality to speed development and aid in visitor use.
The input field is most common, and HTML 5 introduces new kinds of input field types for increased responsiveness. A couple of examples are:
Email type. Field expects a valid email address.
URL type. Field expects a fully qualified URL.
How do these new features affect you as a developer? First, they provide very quick feedback to the user. Second, they can act as a springboard for more robust form handling.
Certain devices like the iPhone will present the user with different ways to interact with these new form elements automatically. For example, tapping inside a "URL" form field will open the iPhone keyboard that has the forward slash as well as the ".com" button ready for use.
Although you still still need properly tested and error checked client or server side scripting to validate a form, HTML 5 can assist by marking required fields. By simply adding the attribute "required," the form will do a few things for you. If the browser or device supports it, the user will get very simple built-in validation errors if a field is brought to focus, then de-focused without entering anything. In conjunction with the new input types such as "email" described above, the form can also prompt the user with additional error messages if the address is invalidly typed.
Overall, as more browsers and devices add support for these new features across the board, we will begin to see more robust web applications with lots of functionality built right into the front end. Its a good idea to start integrating these features into your code now, since anything unsupported will simply revert to a default input field, and not break the form.
Source by Corey N