Skip to content
Related Articles

Related Articles

HTML <input type=”hidden”>

View Discussion
Improve Article
Save Article
  • Last Updated : 22 Jul, 2022
View Discussion
Improve Article
Save Article

The HTML <input type=”hidden”> is used to define a input Hidden field. A hidden field also includes those data that could not be seen or modified by the users when submitted the form. A hidden field only stores those database records that need to be updated when submitting the form. 

Syntax: 

<input type="hidden"> 

Example: 

html




<!DOCTYPE html>
<html>
 
<head>
    <title>
        HTML input type hidden
    </title>
     
    <style>
        h1 {
            color: green;
        }
        body {
            text-align: center;
        }
    </style>
</head>
 
<body>
    <h1>
        GeeksforGeeks
    </h1>
     
    <h3>
        HTML &lt;input type = "hidden"&gt;
    </h3>
     
    <form action="#">
        <input type="hidden" id="myFile" value="1234">
     
        Name: <input type="text">
         
        <input type="submit" value="Submit">
    </form>
</body>
 
</html>                                   

Output:

  

Supported Browsers: The browsers supported by <input type=”hidden”> are listed below:

  • Google Chrome 1.0 and above
  • Edge 12.0 and above
  • Internet Explorer
  • Firefox 1.0 and above
  • Safari 1.0 and above
  • Opera 2.0 and above

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!