Here is a description of the HTML DOM display property definition and usage, the HTML DOM display property is used primarily to set how the element is displayed, such as when this property value is none, which means that the element is not displayed, and the block indicates that the element will be displayed as a chunk-level element. This element is preceded by a newline character.
HTML DOM Display property definition and usage
This property is primarily used to set how the element is displayed.
Syntax:
Object.style.display=value
Possible values
HTML DOM Display Property instance
This example sets the element to not be displayed:
<html> <head> <script type= "Text/javascript" > function Removeelement () { document.getelementbyid ("P1"). style.display= "None"; } </script> </head> <body> <h1>hello</h1> <p id= "P1" >this is some text. this is some text. This is some text. This is some Text. this is some text. this is some text. this is some text. This is some text. This is some text.</p> <input type= "button" onclick= "Removeelement ()" value= "Do not Display paragraph " /> </body> </html>