24. Newtypes in HTML5
<inputtype='email' />
A field for editing an e-mail
address. The input value is
validated to contain either
the empty string or a single
valid e-mail address before
submitting.
25. Newtypes in HTML5
<inputtype='search' />
A single-line text field for
entering search strings;
line-breaks are automatically
removed from the input value.
26. Newtypes in HTML5
<inputtype='url' />
A field for editing a URL.
The input value is validated
to contain either the empty
string or a valid absolute
URL before submitting. Line-
breaks and leading or
trailing whitespace are
automatically removed from
the input value.
27. Newtypes in HTML5
<inputtype='file' />
A control that lets the user
select a file. Use the accept
attribute to define the types
of files that the control can
select.
31. Newtypes in HTML5
<inputtype='tel' />
A control for entering a
telephone number; line-breaks
are automatically removed
from the input value, but no
other syntax is enforced.
32. Newtypes in HTML5
<inputtype='color' />
A control for specifying a
color. A color picker's UI
has no required features
other than accepting simple
colors as text.
40. formmethod
GET/ POST
» input
<form method='post'>
<input type='submit' />
<input type='submit' formmethod='get' value='GET!' />
</form>
» post The data from the form is included in the
body of the form and is sent to the server.
» get The data from the form are appended to the
form attribute URI and is sent to the server.
43. max / min
» input [numeric, date-time]
the max / min value that can be submitted
44. pattern
» input [ text, search, tel,
url or email]
<input type='text'
required
pattern='d{3}[-]d{3}[-]d{4}'
title='###-###-####' />
A regular expression that the
control's value is checked
against.
45. placeholder
» input
A hint to the user of what can be entered in the
control.
<label> Email
<input placeholder="e.g. aaron@ivorypenguin.com" />
</label>