
The HTML open attribute defines that the information should be visible by default.
The HTML open attribute can be used on the following element:
Syntax:
<details open>
Example:
<!DOCTYPE html>
<html>
<body>
<details open>
<summary>HTML</summary>
<p>HTML defines the structure of the web page.</p>
</details>
</body>
</html>
Output:
The example shows a details element that is visible by default:
HTML
HTML defines the structure of the web page.
Read also: