The <input> tag with a type="hidden"
attribute creates a hidden (invisible) input element.
It is invisible but will be included during form submission.
An <input> element of type hidden.
The element is invisible, but its value will be included during form submission.
<form action="/tutorial/action.html">
<fieldset style="background-color:#f6f8ff;border:2px solid #4238ca;">
<legend>Edit your address</legend>
<input type="text" name="street" value="908 Westminster Street"><br /><br />
<input type="text" name="city" value="Houston"><br /><br />
<input type="text" name="state" value="Texas"><br /><br />
<input type="hidden" name="userId" value="3229440">
<input type="submit" value="Submit">
</fieldset>
</form>
The <input type="hidden">
creates a hidden input control.
Hidden input elements are not visible, but their values are included during form submission.
Hidden fields are commonly used in web applications that have a database backend.
Tip: Don't store sensitive data in hidden fields because it is easily viewable in the page source.
<input type="hidden">
Here is when type="hidden"
support started for each browser:
Chrome
|
1.0 | Sep 2008 |
Firefox
|
1.0 | Sep 2002 |
IE/Edge
|
1.0 | Aug 1995 |
Opera
|
1.0 | Jan 2006 |
Safari
|
1.0 | Jan 2003 |
Back to <input>