special treatment in a moment), but browsers that don’t recognize
treat it as
and render it as a plain text field.
I cannot emphasize enough how important this is. The Web has millions of forms that
ask you to enter an email address, and all of them use
. You see a
text box, you type your email address in the text box, and that’s that. Then along comes
HTML5, which defines
. Do browsers freak out? No. Every single browser
on Earth treats an unknown
—even IE 6. So you can “up-
grade” your web forms to use
What would it mean to say that a browser does support
? Well, it can mean
any number of things. The HTML5 specification doesn’t mandate any particular user
interface for the new input types. Opera styles the form field with a small email icon.
Other HTML5 browsers, like Safari and Chrome, simply render it as a text box—
—so your users will never know the difference (unless they
view the page source).
And then there’s the iPhone.
The iPhone does not have a physical keyboard. All “typing” is done by tapping on an
onscreen keyboard that pops up at appropriate times, like when you focus a form field
in a web page. Apple did something very clever in the iPhone’s web browser: it recog-
nizes several of the new HTML5 input types, and dynamically changes the onscreen
keyboard to optimize for that kind of input.
For example, email addresses are text, right? Sure, but they’re a special kind of text.
That is, virtually all email addresses contain the
sign and at least one period (
they’re unlikely to contain any spaces. So when an iPhone user focuses on an
element, she gets an onscreen keyboard that contains a smaller-than-
usual space bar, plus dedicated keys for the
characters, as shown in Figure 9-3.
To sum up: there’s no downside to converting all your email address form fields to
immediately. Virtually no one will even notice, except iPhone users, who
probably won’t notice either. But the ones who do notice will smile quietly and thank
you for making their web experience just a little easier.
Web addresses—known to many as URLs, and to a few pedants as URIs—are another
type of specialized text. The syntax of a web address is constrained by the relevant
Internet standards. If someone asks you to enter a web address into a form, he’ll be
expecting something like
, not “125 Farwood Road.” Forward
slashes and periods are common, but spaces are forbidden. And every web address has
a domain suffix like “.com” or “.org”.
Behold...(drum roll please)...
. On the iPhone, it looks like
Web Addresses | 151
Download from Library of Wow! eBook <www.wowebook.com>