HTML Hide Element

You can hide an element by using the Boolean attribute hidden with the element. When you specify the hidden attribute in the HTML file, then the browser will not display that element, which is specified with this attribute.

Syntax

Examples:T he following examples are specified to understand easily how to use the hidden attribute with different elements or tags:

Example 1: This example uses the hidden attribute with the paragraph tag.

Test it Now

Output:

HTML Hide Element

Example 2: The following example uses the hidden attribute with the element.

In this example, we have used the hidden attribute with two input tags. These input fields will not display on the web page, when the following program executes.

Test it Now

Output:

HTML Hide Element

Browser Support

Element chrome browser Chrome ie browser IE firefox browser Firefox opera browser Opera safari browser Safari
6.0 11.0 4.0 11.1 5.1

Next TopicHTML Reset Button




Contact US

Email:[email protected]

HTML Hide Element
10/30