HTML Attributes

HTML open attribute

Makes details expanded or dialog visible in its non-modal open state. Setting open is not equivalent to calling showModal() on dialog. Applicable elements include: <details>, <dialog>. Check each element’s value rules. Boolean syntax: presence enables the state; omit the attribute to disable it. A string value of "false" does not turn it off.

Formal Syntax & Structure

html syntaxhtml
open

Parameters & Attributes

NameTypeDescription
openbooleanMakes details expanded or dialog visible in its non-modal open state. Setting open is not equivalent to calling showModal() on dialog.

Working Example

Example Snippethtml
<details open>  <summary>Details</summary>  <p>More information.</p></details>
HTML Reference