HTML hidden Global Attribute

Description

The global attribute hidden hides the contents of an element from being viewed on the page.

The hidden attribute is usually used so that the user does not see the element until another condition is met (for example, the requirement to tick). Using JavaScript later, you can remove the hidden attribute from the element and make the element visible to the user.

Syntax

<element hidden>

Values

  • hiddenAn attribute value is required only in XHTML.

Example

<p>The paragraph is important, so it is not visible to everyone.</p> 
<a href="#" hidden>Hidden link.</a>

Browser Support

Desktop
Explorer Edge Chrome Firefox Opera Safari
11YesYesYesYesYes
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
4YesYesYesYesYes