Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

Placeholder Form Field Input Attribute Tutorial

Learn to apply the placeholder attribute to your HTML web form input fields. The placeholder input attribute populates the target text field with lightly colored instructions to the user that disappear when the user begins typing, and reappear if the user removes all text from that field. This can save real estate in your web applications if you do away with your form labels. The placeholder text can serve as labels or instructions for the field. <!DOCTYPE html> <html> <head> </head> <body> <h2>Form Input Placeholder Example</h2> <input type="text" name="fname" id="fname" placeholder="Type first name here"> <br><br> <input type="text" name="lname" id="lname" placeholder="Type last name here"> </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