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.
Regardless of your stance on pornography, it would be impossible to deny the massive impact the adult website industry has had on pushing the web forward. From pushing the browser's video limits to pushing ads through WebSocket so ad blockers don't detect them, you have...