New in HTML5.

<input autofocus>

Sharing is caring!

Attribute of
How To Use Input To Create Form Fields In HTML: Easy Tutorial
What does <input autofocus> do?
Specifies that the input field should be in focus immediately upon page load.

Code Example

 <label for="name">Name</label><br>
 <input name="name" id="name" autofocus>

Adam is a technical writer who specializes in developer documentation and tutorials.

Browser Support for autofocus