HTML and CSS Reference
In-Depth Information
Figure 1.1. Examples of some of the new form input widgets introduced in HTML5. Note that not all browsers
provide support for widgets yet.
In chapter 2 , you'll learn about Modernizr, an HTML5 feature-detection script. Using
Modernizr, you'll be able to detect if a browser supports a given input type, providing a
fallback JavaScript-powered widget if required.
New attributes for altering the behavior of fields
In addition to new form field types, HTML5 introduces ten common attributes, shown in
table 1.2 , that allow you to alter the behavior of a given field. The placeholder attrib-
ute is an example of one of these new attributes, and it allows you to define text that will
appear in the field before it contains a value. This is illustrated in figure 1.2 .
Table 1.2. HTML5's new input element attributes
autocomplete
autofocus
list
max
min
multiple
pattern placeholder
required
step
 
 
Search WWH ::




Custom Search