HTML DOM document visibilityState Property Last Updated : 19 Jun, 2023 Comments Improve Suggest changes Like Article Like Report The visibilityState property returns the visibility of the document. This is a read-only property. Syntax: letvis = document.visibilityState; Return Value: visible: When page content may be visible to the user.hidden: When page content is not visible to the user.prerender: when the document is being prerendered and is not visible to the user. Example: In this example, we are using the above-explained property. HTML <!DOCTYPE html> <html> <body> <h1>GeeksforGeeks</h1> <button onclick="get()"> Get visibility </button> <script type="text/javascript"> function get() { let m = document.visibilityState; console.log(m); } </script> </body> </html> Output: Supported Browsers: Google ChromeEdgeFirefoxOperaSafari Comment More infoAdvertise with us Next Article HTML | DOM documentURI Property T taran910 Follow Improve Article Tags : JavaScript HTML-DOM HTML-Property Similar Reads HTML | DOM Style visibility Property The Style visibility property in HTML DOM used to set the visibility for an element. It is used to hide or show the element. It returns the visibility property that is given to an element. Syntax: It returns the visibility property.object.style.visibilityIt is used to set the visibility property. ob 2 min read HTML | DOM documentURI Property The documentURI property in HTML DOM used to set or return the location of a document. The return value is null If the document was created by the DocumentImplementation object or undefined. The documentURI property can be used on any document types. Syntax: Return the documentURI property: document 1 min read HTML DOM Document hidden Property The Document hidden property returns a Boolean value indicating if the page is considered hidden or not. This is a read-only property. Syntax: let bool = document.hidden; Return Value: This property returns a Boolean Value. true if the page is considered hidden.false if the page is not considered hi 1 min read HTML DOM Style display Property The HTML DOM Style display property is used to set or return the display type of an element. It is similar to the visibility property, which displays or hides the element. With a slight difference in display: none, hiding the entire element, while visibility: hidden meaning only the contents of the 3 min read HTML DOM doctype Property The DOM doctype property is used to return the doctype of any HTML document. The DocumentType object is the name property used to return the name of the object. If there is no doctype declared in the document then it returns a Null value. Syntax:document.doctypeExample: In this example, we will use 2 min read HTML DOM doctype Property The DOM doctype property is used to return the doctype of any HTML document. The DocumentType object is the name property used to return the name of the object. If there is no doctype declared in the document then it returns a Null value. Syntax:document.doctypeExample: In this example, we will use 2 min read Like