Entering Email Addresses, URLs, Telephone Numbers, and Search Terms

You can use the input types email, url, tel, and search to enable users to enter email addresses, URLs, telephone numbers, and search terms.

If you use <input type="email" />, and you are using the touch keyboard, then you get the specialized keyboard which includes @ and .com keys in Figure 5.9.

Image

FIGURE 5.9 Touch keyboard for email

Using <input type="email" /> also gives you automatic validation. You must enter a valid email address or you get the validation error message in Figure 5.10.

FIGURE 5.10 Validation for email

Using <input type="url" /> creates a special input field ...

Get Windows® 8.1 Apps with HTML5 and JavaScript Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.