HTML <input> autofocus Attribute
Example Let the “First name” input field automatically get focus when the page loads: <form action=”/action_page.php”> First name: <input type=”text” name=”fname” autofocus><br> Last name: <input type=”text” name=”lname”><br> <input type=”submit”> </form> Try it Yourself » Definition and Usage The autofocus attribute is a boolean attribute. When present, it specifies that an <input> element should automatically get focus when the page loads. Browser Support The numbers […]
