Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

Autofocus Form Input Attribute Tutorial

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>
thumb

HTML Videos

Form Components

Color Picker Input TutorialSlider Tutorial Javascript Function ProgrammingNumeric Stepper Form Input TutorialDate Time Form Input Type TutorialProgress Bar Progressive Javascript Events ProcessingAutocomplete Text Input Datalist List Attribute TutorialAutofocus Form Input Attribute TutorialPlaceholder Form Field Input Attribute TutorialRequired Form Field Input Attribute Tutorialfieldset and legend Elements Form Area Containers TutorialCustom HTML Form Input Programming Tutorial