HTML <details>Tag


Examples

Use the <details> element:

<details> <summary>Copyright 1999-2011.</summary> <p> - by Refsnes Data. All Rights Reserved.</p> <p>All content and graphics on this web site are the property of the company Refsnes Data.</p> </details>

Try it Yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

Currently, only Chrome and Safari 6 support the <details> tag.


Definition and Usage

The <details> tag specifies additional details that the user can view or hide.

The <details> tag is used to create an interactive control that users can open and close. Any kind of content can be placed inside the <details> tag.

The content of the <details> element is not visible to the user unless the open attribute is set.


Differences Between HTML 4.01 and HTML5

The <details> tag is new in HTML5.


Tips and Notes

Tip:and<summary>The <summary> tag is used together with <details> to define a heading for the details. The heading is visible, and when the user clicks the heading, the details will be shown.


Attributes

NewNew attributes in HTML5.

Attribute Value Description
openNew open Specifies whether the details are visible.

Global Attributes

The <details> tag supportsHTML Global Attributes。


Event Attributes

The <details> tag supportsHTML Event Attributes。

Other Extensions