HTML and CSS Reference
As the user starts to type, the browser will display a list of options that match the user's input, as shown in Figure
Figure 6-13 An <option> element that is linked to a <datalist>, as displayed in Opera.
Browser support for the <datalist> element is increasing, but at the time of writing this topic, the majority of mo-
bile web browsers and the Safari desktop browser do not have support.
HTML5 has introduced a lot of changes to how web forms can be created. In this chapter you learned how to use
new input types such as number , search , and datetime-local to create form controls that make it even easi-
er for users to fill in your web forms.
This chapter has also introduced you to a number of new input attributes that can be used to make the overall user
experience of filling in your web forms better. You have learned how you can use attributes such as autocom-
plete and autofocus to control a web browser's behavior, as well as learning how to provide hints to users us-
ing the placeholder attribute.
In Chapter 7 you start exploring the world of browser validations, another new feature in HTML5. You will learn
how to require an input from a user as well as more complex validations such as creating patterns to validate the
format of data.