Tutorials References Exercises Menu
Paid Courses

HTML <input type="hidden">

❮ HTML <input> type attribute

Example

Define a hidden field:

 <input type="hidden" id="custId" name="custId" value="3487">
Try it Yourself »

Definition and Usage

The <input type="hidden"> defines a hidden input field.

A hidden field let web developers include data that cannot be seen or modified by users when a form is submitted.

A hidden field often stores what database record that needs to be updated when the form is submitted.

Note: While the value is not displayed to the user in the page's content, it is visible (and can be edited) using any browser's developer tools or "View Source" functionality. Do not use hidden inputs as a form of security!


Browser Support

The numbers in the table specify the first browser version that fully supports the element.

Attribute
type="hidden" 1.0 Yes 1.0 1.0 1.0

Syntax

<input type="hidden">

❮ HTML <input> type attribute