DOM Properties
HTMLElement.hidden
Read/write. Reflects ordinary hidden and hidden-until-found states. Setting true hides the element; false removes the hidden attribute. CSS display rules can affect visibility. Do not use this as a substitute for authorization. Example result: true.
Formal Syntax & Structure
html syntaxhtml
element.hiddenReturn Value
boolean or string
Property value. Read/write.
Working Example
Example Snippethtml
<p id="demo">Notice</p><p> Result: <output id="result"></output></p><script> const e = document.getElementById('demo'); const result = value => { document.getElementById("result").textContent = String(value); }; e.hidden=true; result(e.hasAttribute('hidden'));</script>Browser Compatibility
Minimum supported versions across modern rendering engines
Chrome
6
Yes
Edge
12
Yes
Firefox
4
Yes
Safari
5.1
Yes
Opera
11.6
Yes
Checked desktop BCD snapshot: HTMLElement.hidden base property; until-found is separate. Versions denote the recorded start of support (≤ means at least that early), not a guarantee of all behavior. Unresolved mirror and preview rows omitted.
HTML Living Standard