How to create a hidden input field in form using HTML ? Last Updated : 18 Oct, 2021 Comments Improve Suggest changes Like Article Like Report In this article, we will learn how to add a hidden input field into our form using HTML. A hidden control stores the data that is not visible to the user. It is used to send some information to the server which is not edited by the user. Normally, this hidden field usually contains the value which is common for all the users. The value must be recorded in the database. A hidden input field often contains those value which needs to be updated on the database when the form is submitted. Approach: We create an HTML Document that contains an <input> Tag.Use the type attribute with the <input> tag.Set the type attribute to value "hidden". Syntax: <input type="hidden"> Example: In this code, we create a hidden field that contains a record of the user who belongs to the same country i.e India. HTML <!DOCTYPE html> <html> <head> <title> How to create a hidden input field in form using HTML? </title> <style> h1 { color:green; } body { text-align:center; } </style> </head> <body> <h1> GeeksforGeeks </h1> <h3> How to create a hidden input field in form using HTML? </h3> <form action="#"> <input type="hidden" name="country_name" id="inputID" value="India" > Name: <input type="text"> <input type="submit" value="Submit"> </form> </body> </html> Output: hidden input field Comment More infoAdvertise with us Next Article How to create a hidden input field in form using HTML ? M manaschhabra2 Follow Improve Article Tags : HTML HTML-Questions Similar Reads How to Insert Email Address into Form using HTML5 ? In this article, we will learn how to add and get an email address of a user as data of the form by adding an email input field. As we know that an email_id is a vital component of user data. Email address is used for the verification of the user. It is also used to make contact with the submitters 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 Hide the Email Id in a form using HTML and JavaScript Hiding an email ID in a form using HTML and JavaScript involves obfuscating or masking the email address to enhance privacy or security. This can be achieved by partially hiding the email characters or storing the email in hidden fields until needed for processing.Examples:Input :[email protected] 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 How To Validate Input Field In The HTML Form? Input fields are essential components of HTML forms, enabling users to provide data for processing. Ensuring proper validation of these input fields enhances user experience and prevents errors or malicious inputs. What We Are Going to Create?We will create simple Validating Input Fields in HTML For 3 min read Like