HTML5 autofocus Attribute
INPUT placeholders, client side file naming, and audio/video, can now be completed using basic HTML. Another simple functionality HTML now allows us is auto-focusing on elements upon page load; this is accomplished using the
The code is as simple as it gets:
<!-- These all work! -->
<input autofocus />
When the autofocus attribute is present, the
BUTTON element is automatically selected upon page load. I experimented with display elements (
H1 tag) and a
tabIndex of 0, but autofocus did not work for them.
New York, NY · October 12-14
Get 20% off with
Your early CSS books were instrumental in pushing my love for front end technologies. What was it about CSS that you fell in love with and drove you to write about it?
At first blush, it was the simplicity of it as compared to the table-and-spacer...
Back in late 2012 it was not easy to find open source projects using
Since we've already figured out how to create TinyURL URLs remotely using PHP, we may as well create a small AJAX-enabled tiny URL creator. Using MooTools to do so is almost too easy.
The XHTML (Form)
We need an input box where the user will enter...