HTML keygen autofocus attribute
Examples
Let "Encryption" field automatically get the focus when the page loads:
<form action="demo_keygen.html" method="get">
Username: <input type="text" name="usr_name">
Encryption: <keygen name="security" autofocus>
<input type="submit">
</form>
Username: <input type="text" name="usr_name">
Encryption: <keygen name="security" autofocus>
<input type="submit">
</form>
try it"
Browser Support
autofocus attribute Opera, Chrome and Safari 6 Support <keygen> tag.
Definition and Usage
autofocus attribute is a Boolean attribute.
autofocus attribute specifies when the page loads, <keygen> element will automatically receive focus.
Differences between HTML 4.01 and HTML5
<Keygen> tag is new in HTML5 tags.
Differences between HTML and XHTML
In XHTML, prohibit attribute minimization, autofocus attribute must be defined as <keygen autofocus = "autofocus" />.
grammar
<keygen autofocus>
HTML <keygen> tag