DOM HTMLElement.hidden Property
The hidden property shows or hides an element by setting its hidden attribute.
Description
The hidden property reflects the element's hidden attribute. Setting it to true hides the element from everyone, including screen readers; false shows it. The value "until-found" keeps content hidden but lets the browser's find-in-page reveal it.
A CSS rule that sets display on the element can override the attribute, so add [hidden] { display: none !important; } if your styles might conflict.
Hidden elements aren't rendered and are removed from the accessibility tree, so screen readers ignore them too. To hide something visually while keeping it available to screen readers, use a "visually hidden" CSS class instead.
Syntax
element.hidden
element.hidden = true | false | "until-found"Value
true if the element is hidden, false if not, or "until-found".
Example
Browser Support
The following information will show you the current browser support for the HTMLElement.hidden property. Hover over a browser icon to see the version that first introduced support for this property.
Desktop





Tablets & Mobile





