New in HTML5.

<input autofocus>

Attribute of
<input> HTML Tag
What does <input autofocus> do?
Specifies that the input field should be in focus immediately upon page load.

Code Example

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

Browser Support for autofocus

10434513934