Javatpoint Logo
Javatpoint Logo

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 <input type=text> 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

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<tag hidden>6.011.04.011.15.1

Next TopicHTML Reset Button





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA