The HTML <details> element is used as a disclosure widget from which the user can retrieve additional information.

Content categories Flow content, sectioning root, interactive content, palpable content.
Permitted content One <summary> element followed by flow content.
Tag omission None, both the starting and ending tag are mandatory.
Permitted parents Any element that accepts flow content.
Permitted ARIA roles None
DOM interface HTMLDetailsElement


This element includes the global attributes.

This Boolean attribute indicates whether the details will be shown to the user on page load. Default is false and so details will be hidden.


  <summary>Some details</summary>
  <p>More info about the details.</p>

Live result

Note: If the live sample above doesn't work for you, see Browser compatibility to determine if your browser supports the feature at all.

Example with styling

Following the more recent spec, Firefox makes the summary element display: list-item and the marker can be styled the same way list items can be styled. Following an older spec, Chrome and Safari have a custom ::-webkit-details-marker pseudo element which can be styled.

For cross browser compatible styling hide Firefox's marker by setting summary { display: block } and Chrome and Safari's marker by setting ::-webkit-details-marker {display: none;}. Styling can then be applied in a way appropriate to the necessary styles. The example below uses CSS generated content to add the marker back.

HTML Content

 <summary>Some details</summary> 
 <p>More info about the details.</p> 

CSS Content

summary {
 display: block;

summary::-webkit-details-marker {
 display: none;

summary::before {
 content: '\25B6';
 padding-right: 0.5em;

details[open] > summary::before {
 content: '\25BC';



Specification Status Comment
WHATWG HTML Living Standard
The definition of '<details>' in that specification.
Living Standard  
The definition of '<details>' in that specification.
Recommendation Initial definition

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer MS Edge Opera Safari
Basic support 12 49.0 (49.0) No support Under consideration 15 6
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support 4.0 49.0 (49.0) No support No support No support

See also