Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML DOM Details object


May 06, 2021 JavaScript with HTML DOM Reference book


Table of contents


HTML DOM Details object


Details object

The Details object represents an HTML- and details-and-details element.

Access the Details object

You can use getElementById() to access the elements:

varx = document.getElementById("myDetails"); try it

Create a Details Object

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

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

Details object properties

Attributes describe
open Set whether or not the description information within the Details tag is displayed.

Standard properties and events

Details objects also support standard properties and events.


Related articles

HTML Reference Manual: HTML slt;details.gt; Tags