HTML and CSS Reference
In-Depth Information
<keygen>
The purpose of <keygen> is to provide an API into your operating
system's cryptography store. It allows public/private key
exchange to take place between you and the server. If that doesn't
make any sense to you, it's safe to skip ahead to the next section.
<keygen> originated as a proprietary feature in Netscape Navigator. It
was then reverse-engineered by Opera and WebKit. As long as the ele-
ment is useful, the HTML5 way is to document existing behavior so
that everyone can implement in an interoperable manner. We won't
use <keygen> in this topic, because it depends on relatively complex
server-side code to be useful, but it's mentioned here for completeness.
You've now learned about the many new input types
and elements available in HTML5 forms, but it doesn't
stop there. The next section investigates new form
features that aren't tied to specific elements.
New attributes for the <input> element
In addition to the new form con-
trols in HTML5 , existing HTML4
form controls have been
extended with new attributes.
You've already seen some of
these in the section on validation,
“The required attribute,” where
we covered attributes such as
required and pattern , but several
others can be applied to most
<input> elements: placeholder ,
autofocus , and autocomplete .
placeholder autofocus autocomplete
10
6
17
4
4
4
10
10
10
11
11
10
5
5
5
Placeholder text
A popular technique in recent years has been to put a suggestion for a
field's required user input in the field by default. This is called
 
Search WWH ::




Custom Search