html tutorial - hidden Attribute in HTML - html5 - html code - html form

Hidden attribute in html

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:

<p hidden>Content"><p>

Differences between HTML 4.01 and HTML5 for hidden attribute:

HTML 4.01

  • HTML4 does not support hidden attribute.


  • Hidden attribute is added newly in HTML5.

Applies To:

Element Attribute
All HTML elements hidden

Sample Coding for hidden Attribute in HTML:

Tryit<!DOCTYPE html>
        <title>Wikitechy hidden attribute</title>
        <p hidden>Hidden the Wikitechy content
        <p> Visible the Wikitechy content.

Code Explanation for hidden Attribute in HTML:

hidden Attribute Code Explanation

  1. 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:

hidden Attribute Tag Output

  1. The output displays only the second paragraph “Visible Wikitechy content.”

Browser Support for hidden Attribute in HTML:

6.0 11.0 4.0 5.1 11.1

Related Searches to hidden Attribute in html