Advertisement
Home Open Editor ❯

HTML open Attribute

Example

<details open>
  <summary>HTML</summary>
  <p>The HyperText Markup Language, or HTML is the standard markup language for documents designed to be displayed in a web browser.</p>
</details>

Try this code ❯

Meaning

The open attribute specifies whether details/dialog should be shown to the user.


Standard Syntax

HTML: <element open>
XHTML: <element open="open">


Applies to:

The open attribute can be used on the following element:

Element Attribute
<details> open
<dialog> open

Advertisement

Attribute Values

Value Description
open This is a boolean attribute, the presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.

More Examples

Example

<dialog open>This is an open dialog box</dialog>

Try this code ❯

Home Open Editor ❯
Advertisement