Forms
Before HTML5, adding things like date pickers, placeholder text, and range sliders into forms had always needed JavaScript. Similarly, there had been no easy way to signpost to users the kind of data we expect them to input into certain fields. For example, whether we expect telephone numbers, email addresses, or URLs.
The good news is that HTML5 largely solves these common problems.
We have two main aims in this chapter. Firstly, to understand HTML5 form features and, secondly, to understand how we can lay out forms more simply for multiple devices with the latest CSS features. In this chapter, we will learn how to:
- Easily add placeholder text into relevant form input fields
- Disable autocompletion of form fields where necessary
- Set certain fields to be required before submission
- Specify different input types such as email, telephone number, and URL
- Create number range sliders for easy value selection
- Place date and color pickers...