HTML Hide ElementYou 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. SyntaxExamples: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 NowOutput: 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 NowOutput: Browser Support
Next TopicHTML Reset Button
|