Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML hidden Attribute

HTML hidden Attribute

HTML Global Attributes HTML Global Attributes

Example

A hidden paragraph:

Try it


Browser support

The numbers in the table indicate the first browser version that supports this property.

property
hidden 6.0 11.0 4.0 5.1  11.1

Definition and Usage

The hidden attribute specifies that an element is hidden.

A hidden element will not be displayed.

If this attribute is used, the element will be hidden.

The hidden attribute can be set so that users can see an element only when certain conditions are met (such as selecting a checkbox, etc.). JavaScript can then be used to remove the hidden attribute, making the element visible.


Differences between HTML 4.01 and HTML5

The hidden attribute is new in HTML5.


Differences between HTML and XHTML

In XHTML, attribute minimization is forbidden, and the hidden attribute must be defined as <element hidden="hidden">.


Syntax

<

element

hidden>

HTML Global Attributes HTML Global Attributes