HTML5 Guidelines for Web Developers

(coco) #1
3.1 New Input Types 39

Type Description Example

datetime-
local

Date and time without timezone 2010-08-11T11:58:22.5

number Number 9999 or 99.2

range Numerical value within a range 33 or 2.99792458E8

color Hexadecimal representation of RGB
values in sRGB color space

#eeeeee

3.1.1 The Input Types “tel” and “search”


tel and search are not significantly different from normal text fields. Both can
contain character chains without line breaks. Even telephone numbers are not
limited to numbers, because phone numbers often contain brackets or the plus
symbol. For tel, the browser could offer suggestions from the local address book,
a situation that is particularly useful with cell phones. The search type was intro-
duced to allow the browser to make the search input consistent with the layout
of the relevant platform. Mac OS X users, for example, are used to seeing search
fields with rounded corners.


Figure 3.1 Opera is already far ahead regarding implementation of new form input types

Free download pdf