How to specify a short hint that describes the expected value of an input element using HTML ? Last Updated : 09 Feb, 2022 Comments Improve Suggest changes Like Article Like Report The placeholder attribute specifies a short hint for input field that describes the expected value of an input field/text area. The short hint is displayed in the field before the user enters a value. Syntax: <element placeholder="value"> Attribute Value: This attribute describes the short hint in the input field. Example: HTML <!DOCTYPE html> <html> <head> <title> How to specify a short hint that describes the expected value of an input element? </title> </head> <body style="text-align: center;"> <h1 style="color: green;"> GeeksforGeeks </h1> <h3> How to specify a short hint that describes <br>the expected value of an input element? </h3> <form action=" "> <input type="text" name="fname" placeholder="First name"> <br><br> <input type="text" name="lname" placeholder="Last name"> <br><br> <input type="submit" value="Submit"> </form> </body> </html> Output: Supported Browsers: The browser supported by placeholder Attribute are listed below: Google ChromeInternet ExplorerFirefoxOperaSafari Comment More infoAdvertise with us Next Article How to specify a short hint that describes the expected value of an input element using HTML ? V vkash8574 Follow Improve Article Tags : Web Technologies HTML HTML-Questions Similar Reads How to specify the value of an input element using HTML ? In this article, we will set the value of an input element using HTML. The value attribute for <input> element in HTML is used to specify the initial value of the input element. It has different meaning for different input type: The âbuttonâ, âresetâ and âsubmitâ property specifies the text on 1 min read How to set a regular expression for an input element value that checked against using HTML ? In this article, we will use <input> pattern attribute to set the regular expression pattern for an input field that checked against. The HTML <input> pattern attribute is used to specify the regular expression on which the input elements value is checked against. This attribute works wi 1 min read How to specify the type of an input element using HTML ? In this article, we will specify the type of an input element using HTML. The HTML <input> type attribute is used to specify the type of <input> element to display. The default type of <input> type attribute is text. Syntax: <input type="value"> Attribute Values: button: It i 4 min read How to define a label for an input element using HTML? To define a label for an input element in HTML5, use the <label> tag. This tag enhances usability by allowing users to click on the label text to toggle the associated input control. The <label> tag should include a for attribute that matches the id of the input element, ensuring a clear 1 min read How to set the default value for an HTML <select> element ? The default value of an HTML <select> element ensures that a specific option is preselected when the form loads. This is achieved by adding the selected attribute to the desired <option> tag. The <select> tag is used to create dropdown lists, while <option> tags define the in 2 min read Like