Categories
Web development

HTML open Attribute


HTML open Attribute

The HTML open attribute defines that the information should be visible by default.

The HTML open attribute can be used on the following element:

<details>

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:

HTML progress tag

HTML pre tag

HTML caption tag