Skip to content
Related Articles
Open in App
Not now

Related Articles

HTML | open Attribute

Improve Article
Save Article
  • Difficulty Level : Basic
  • Last Updated : 06 Jun, 2022
Improve Article
Save Article

The open attribute in HTML is used to indicate whether the details will be shown on page load. This is a boolean attribute. If it is not present by default then details are not shown.
Note: This attribute is used by <details> element only. This attribute has been DEPRECATED and is no longer recommended.



<details open> content... </details>



<!-- HTML program to illustrate open Attribute -->
<!DOCTYPE html>
        <title>HTML open Attribute</title>
        <h2 style = "color: green; text-align: center;">
            HTML open Attribute
        <!-- Below details tag has "open" attribute -->
        <details open>
            <summary>Geeks classes</summary>
                An extensive classroom programme to build
                and enhance Data Structures and Algorithm



Supported Browsers: The browser supported by open attribute are listed below: 

  • Apple Safari 6.0
  • Google Chrome 12.0
  • Firefox Not supported
  • Opera 15.0
  • Internet Explorer Not supported


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!