How to specify the value of an input element using HTML ? Last Updated : 25 Dec, 2020 Comments Improve Suggest changes Like Article Like Report 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 the button.The “text”, “password” and “hidden” property specifies the initial value of the input field.The “checkbox”, “radio” and “image” property specifies the value associated with the input. Syntax: <input value = "value"> Attribute Value: It contains single value text which specifies the value of input element. Example 1: HTML <!DOCTYPE html> <html> <head> <title> How to specify the value of an input element using HTML? </title> </head> <body style="text-align:center"> <h1 style="color:green;"> GeeksforGeeks </h1> <h2> How to specify the value of an input element using HTML? </h2> Input Value: <input type="text" value="GeeksforGeeks"> </body> </html> Output: Example 2: HTML <!DOCTYPE html> <html> <head> <title> How to specify the value of an input element using HTML? </title> </head> <body style="text-align:center"> <h1 style="color:green;"> GeeksforGeeks </h1> <h2> How to specify the value of an input element using HTML? </h2> <input type="button" value="Submit"> </body> </html> Output: Comment More infoAdvertise with us Next Article How to specify the value of an input element using HTML ? V vkash8574 Follow Improve Article Tags : Web Technologies HTML HTML-Questions Similar Reads 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 specify the name of an input element? To add the name of an input element, we use the HTML <input> name attribute. The HTML <input> name attribute is used to specify a name for an <input> element. It is used to reference the form data after submitting the form or to reference the element in JavaScript. Syntax:<input 2 min read How to specify a short hint that describes the expected value of an input element using HTML ? 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 hin 1 min read How to Get the Value of an Input Text Box using jQuery? When working with forms or interactive web pages, sometimes need to get the values entered into the input fields. This article provide a complete guide on how to get the value o an input text box using jQuery. Below are the different approaches to get the value of an input text box using jQuery:Get 2 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 Why do we need to specify the value with HTML elements ? In this article, we will see about the need to specify the value with HTML elements along with knowing the supported elements & their implementation through the examples.The value with the HTML element defines the default value for that element & those element's values will be displayed in t 1 min read How to Set a Minimum and Maximum Value for an input element in HTML5? To set minimum and maximum values for an input element in HTML5, we utilize the min and max attributes. For numerical inputs like type numbers, assign the desired limits directly. Alternatively, use JavaScript validation, pattern attributes, or event listeners for more complex validation scenarios, 3 min read Get the Value of Text Input Field using JavaScript Getting the value of a text input field using JavaScript refers to accessing the current content entered by a user in an input element, such as <input> or <textarea>, by utilizing the value property. This allows for dynamic interaction and data manipulation in web forms.Syntax inputField 2 min read How to define a form for user input using HTML5 ? In this article, we will learn how to create a form in a webpage by using the <form> tag. This tag is used to create form for user input. Also there are many elements which are used within form tag. Syntax: <form> Form Content... </form> Example: The following code snippet demonstr 1 min read HTML DOM Input Tel value Property The Input Tel value Property in HTML DOM is used to set or return the value of Tel attribute in the input Tel field. The value attribute specifies the initial value of the input Tel field. It contains the default value or the user types. Syntax: It returns the value property.telObject.valueIt is use 1 min read Like