HTML <details> name Attribute
Example
Using the <details> name attribute:
<details name="requirements">
<summary>HTML Cert</summary>
<p>Requires knowledge of HTML.</p>
</details>
<details
name="requirements">
<summary>CSS Cert</summary>
<p>Requires knowledge of HTML and CSS.</p>
</details>
<details
name="requirements">
<summary>JavaScript Cert</summary>
<p>Requires knowledge of HTML, CSS and JavaScript.</p>
</details>
Try it Yourself »
Definition and Usage
The
name
attribute specifies a group name for several <details>
elements. When using the same name for several <details>
elements, the user can open only one dialog box at the time.
Browser Support
The numbers in the table specify the first browser version that fully supports the attribute.
Attribute | |||||
---|---|---|---|---|---|
name | 120 | 120 | 130 | 17.2 | 106 |
Syntax
<details
name="groupname">
❮ HTML <details> tag