<details>


HTML <details> Tag

Instance

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>php中文网(php.cn)</title> 
</head>
<body>

<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>

<p><b>注意:</b>目前,只有 Chrome 和 Safari 6 支持 details 标签。</p>

</body>
</html>

Run Example»

Click the "Run Instance" button to view the online instance


Browser support

1000.png

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


Tag definition and usage instructions

<details> The tag specifies supplementary details of the user's visible or hidden requirements.

<details> tag is used for users to open and close interactive controls. Any form of content can be placed inside the <details> tag.

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


Differences between HTML 4.01 and HTML5

The<details> tag is a new tag in HTML5.


Tips and Notes

Tip:Use with the <summary> tag to define a title for details. The title is visible, and when the user clicks on the title, the details are displayed.


Attribute

New: New attribute in HTML5.

PropertiesValueDescription
openNew openSpecifies whether details are visible.

Global attributes

<details> tag supports global attributes of HTML.


Event attributes

<details> tag supports HTML event attributes.