HTML5 and CSS3, Second Edition

(singke) #1
It clearly describes the type of data the field will hold, but when implemented
properly, the user will see a calendar widget, like the one Chrome displays:

At the time of writing, Chrome and Opera are the only desktop browsers that
currently support a full calendar picker, but some mobile browsers take
advantage of this field to make it easy for users to select the month, date,
and year. All other browsers simply render a text field.

Email
The email input type is designed to hold either a single email address or an
email-address list, so it’s the perfect candidate for our email field.

html5_forms/index.html
<labelfor="email">Emailcontact</label>
<inputtype="email"name="email"id="email">

Mobile devices get the most benefit from this type of form field, because the
virtual keyboard layouts often change to make entering email addresses
easier. Notice in the following that the @ symbol is prominent on both the
iPhone and Android keyboards:

Chapter 3. Creating User-Friendly Web Forms • 42


Download from Wow! eBook <www.wowebook.com> report erratum • discuss

Free download pdf