Easy Tutorial
❮ Tag Pre Av Event Canplay ❯

HTML hidden Attribute

HTML Global Attributes

Example

Hide a paragraph:

&lt;p hidden>This is a hidden paragraph.</p>

Browser Support

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

Attribute
hidden 6.0 11.0 4.0 5.1 11.1

Definition and Usage

The hidden attribute specifies that an element is not yet, or is no longer, relevant.

Hidden elements are not displayed.

Elements with the hidden attribute are not rendered.

The hidden attribute can be set to keep an element from being visible until some condition is met (like selecting a checkbox, etc.). Then, a JavaScript can 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

❮ Tag Pre Av Event Canplay ❯