HTML: <input type="hidden">
XHTML: <input type="hidden"/>  or  <input type="hidden" />

Creates a control that does not display in the browser. Hidden controls can be used to pass special form-processing information to the server that the user cannot see or alter.

Start/End Tags

This is an empty element. In HTML, the end tag is forbidden. In XHTML, the element must be closed with a trailing slash as just shown. Developers may include a space character before the slash for backward compatibility with older browsers.


  • HTML 4.01
  • HTML5


Values: character
Assigns an access key (keyboard shortcut) to an element for quicker access.


Values: None in HTML. (disabled="disabled" in XHTML)
HTML5 only. Disables the control for user input. It can be altered only via a script. Browsers may display disabled controls differently (grayed out, for example), which could be useful for dimming certain controls until required info is supplied.


Values: id of the form owner
HTML5 only. Explicitly associates the input control with its associated form (its form owner). With this method, the input control does not need to be a child of the applicable form element.


Values: text
Required. Assigns a name to the control; a script program uses this name to reference the control.


Values: number
Not in HTML5. Specifies position in the tabbing order. Tabbing navigation allows the user to cycle through the active fields using the Tab key.


Values: text
Required. Specifies the initial value for this control.
<input type="hidden" name="productID" value="12-XL">

Rendered Example

The hidden input type is a non-rendering element.