The autofocus
global attribute is a Boolean attribute indicating that an element should be focused on page load, or when the <dialog>
that it is part of is displayed.
html
<input name="q" autofocus />
No more than one element in the document or dialog may have the autofocus attribute. If applied to multiple elements the first one will receive focus.
Note: The autofocus
attribute applies to all elements, not just form controls. For example, it might be used on a contenteditable area.