The open
attribute on a <details> tag opens the details element on page load and reveals its content.
By default, <details> are closed and not visible.
An open
attribute on a <details> element.
The content of the <details> element is visible when the page is loaded.
Rome
Athens
Madrid
<details open>
<summary>Cities in Europe</summary>
<p>Rome</p>
<p>Athens</p>
<p>Madrid</p>
</details>
The open
attribute specifies that the content of the <details> element is visible on page load.
By default, the content in a <details> element is hidden (closed).
<details open>
Here is when open
support started for each browser:
Chrome
|
12.0 | Jun 2011 |
Firefox
|
49.0 | Sep 2016 |
IE/Edge
|
79.0 | Jan 2020 |
Opera
|
15.0 | May 2013 |
Safari
|
6.0 | Jul 2012 |
Back to <details>