Last Updated : 11 Jul, 2025
The HTML hidden Attribute, a boolean attribute, hides elements from display in browsers. It's useful for elements not yet relevant or hidden until certain conditions are met via JavaScript.
Syntax<element hidden>
Note: This attribute is new in HTML 5.
Supported TagsThis is a Global attribute and can be used on any HTML element.
HTML hidden Attribute ExampleExample 1: This simple example illustrates hiding the content from the user by using the hidden attribute with the <div> element in HTML.
HTML
<!DOCTYPE html>
<html>
<head>
<title>hidden attribute</title>
</head>
<body>
<h2>HTML hidden attribute</h2>
<!-- hidden paragraph -->
<div hidden>
This content will be hidden while
displaying the content
</div>
<h4>
A computer science portal for geeks
</h4>
</body>
</html>
Output:
HTML hidden Attribute example outputSupported Browsers:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4