HTML Global hidden Attribute
Example
<p hidden>I'm hidden paragraph</p>
<p>I'm visible paragraph</p>
Meaning
The hidden attribute is a Boolean, or presence-based, attribute that does not require a value.
The element is not currently relevant and the user agent should not render it when this attribute is specified
This attribute was initially called irrelevant in earlier HTML5 drafts.
Notes:
In XHTML5, you should use the value of hidden, as attributes must have values with XML syntax.
If elements styled display: flex; will be displayed despite the hidden attribute's presence.
Standard Syntax
<element hidden>
Browser Support
Status
Attribute Values
Value | Description |
---|---|
hidden | This is a boolean attribute, the presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value. |