HTML DOM Details Object

Details Object

The Details object represents the HTML <details> element.

Accessing the Details Object

You can access the <details> element by using getElementById():

var x = document.getElementById("myDetails");

Try It Yourself

Creating a Details Object

You can create a <details> element by using the document.createElement() method:

var x = document.createElement("DETAILS");

Try It Yourself

Details Object Properties

Properties Description
open Set or return whether details is visible to the user.

Standard Properties and Events

Details Object Supports StandardsPropertiesAndEvents.

Related Pages

HTML Reference Manual:HTML <details> Tag