Learn html - html tutorial - Hidden attribute in html - html examples - html programs
The hidden attribute is used to hide an element.
The hidden attribute can used with all HTML elements.
The Browsers do not display the elements which has the hidden attribute.
The hidden attribute is a section of the Global Attributes.
Syntax for hidden attribute in HTML:
Differences between HTML 4.01 and HTML5 for hidden attribute:
HTML 4.01
HTML4 does not support hidden attribute.
HTML 5
Hidden attribute is added newly in HTML5.
Applies To:
Element
Attribute
All HTML elements
hidden
Sample Coding for hidden Attribute in HTML:
Code Explanation for hidden Attribute in HTML:
The paragraph tag has the hidden attribute, so the browser does not show the content “Hidden Wikitechy content”. Another paragraph tag does not has hidden attribute, so “Visible Wikitechy content.” Will be shown.
Output for hidden Attribute in HTML:
The output displays only the second paragraph “Visible Wikitechy content.”