autofocus attribute is used to set the “focus” of a browser to the specified form element after the page loads.
Refresh the page. See how the cursor is blinking inside the first example input box? This means it is “focused,” and can take input right away.
<p> Password: <input type="password" name="password" id="test-password" autofocus /> </p>
Comments or Concerns:
NOTE: Unlike most attributes, there is no “value” to assign. Therefore the attribute it passed in alone.