Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. HTMLDetailsElement
  4. name

HTMLDetailsElement: name property

Baseline 2024
Newly available

Since ⁨September 2024⁩, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

Thename property of theHTMLDetailsElement interface reflects thename attribute of<details> elements. It enables multiple<details> elements to be connected together, where only one for the<details> elements can be open at once. This allows developers to easily create UI features such as accordions without scripting.

The name attribute specifies a group name — give multiple<details> elements the same name value to group them. Only one of the grouped<details> elements can be open at a time — opening one will cause another to close. If multiple grouped<details> elements are given theopen attribute, only the first one in the source order will be rendered open.

Value

A string. The empty string if the element is not part of any group.

Specifications

Specification
HTML
# dom-details-name

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp