Autofocus Form Input Attribute Tutorial

Published :
Author :
Adam Khoury
Learn to apply autofocus to your HTML web form input fields to force a blinking cursor to appear in your target text field, which will draw the users eye and instruct them to begin typing. <!DOCTYPE html> <html> <body> <h2>HTML5 Form Input Autofocus Attribute Example</h2> First Name: <input type="text" id="fname" name="fname" autofocus > <br><br> Last Name: <input type="text" id="lname" name="lname"> </body> </html>