autofocus
is a global attribute that sets a field as focused on page load.
<input name="first_name" autofocus />
No JavaScript required!
A use case could be a new customer form that an employee fills out multiple times a day. By autofocusing the first name field, you could save that employee thousands of clicks.
Carefully consider user experience and accessibility before using this attribute.
Docs: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus