X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML hidden Attribute

HTML Global Attributes HTML Global Attributes

Example

A hidden paragraph:

<p hidden>This paragraph should be hidden.</p>

Try it Yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The hidden attribute is supported in all major browsers, except Internet Explorer.


Definition and Usage

The hidden attribute is a boolean attribute.

When present, it specifies that an element is not yet, or is no longer, relevant.

Browsers should not display elements that have the hidden attribute specified.

The hidden attribute can also be used to keep a user from seeing an element until some other condition has been met (like selecting a checkbox, etc.). Then, a JavaScript could remove the hidden attribute, and make the element visible.


Differences Between HTML 4.01 and HTML5

The hidden attribute is new in HTML5.


Differences Between HTML and XHTML

In XHTML, attribute minimization is forbidden, and the hidden attribute must be defined as <element hidden="hidden">.


Syntax

<element hidden>


HTML Global Attributes HTML Global Attributes

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook