HTML and CSS Reference
In-Depth Information
The search input type
This input type, <input type=search> , expects a search term.
In Safari there is also an unspecified proprietary attribute that
adds a history of recent results, using the results=n attribute.
The difference between search and text type is only stylistic,
and in Safari on the Mac, it takes the operating system's default
rounded-corners style for search —which can nonetheless be
overwritten with some proprietary CSS (hat-tip to Wilfred Nas
for this):
input[type=”search”] {-webkit-appearance: textfield;}
The tel input type
<input type=tel> expects a telephone number. There is no
special validation; it doesn't even enforce numeric-only input, as
many phone numbers are commonly written with extra charac-
ters, for example +44 (0) 208 123 1234.
As mobile phones “know” their own number, we expect that
most mobile phones will be able to do things like autocom-
pleting these entry fields. None currently do this, although the
iPhone brings up a telephone number input screen ( Figure 3.8 ).
FIguRE 3.8 The iPhone's
keypad for completing <input
type=tel> .
 
Search WWH ::




Custom Search