The The Any sort of content can be put inside the Tip: The <summary> tag is used in conjunction with |
Example:
HTML
<details>
<summary>Epcot Center</summary>
<p>Epcot is a theme park at Walt Disney World Resort featuring exciting attractions, international pavilions, award-winning fireworks and seasonal special events.</p>
</details>
Attribute | Value | Description |
---|---|---|
open | open | Specifies that the details should be visible (open) to the user |
Example:
HTML
<html>
<style>
details > summary {
padding: 4px;
width: 200px;
background-color: #eeeeee;
border: none;
box-shadow: 1px 1px 2px #bbbbbb;
cursor: pointer;
}
details > p {
background-color: #eeeeee;
padding: 4px;
margin: 0;
box-shadow: 1px 1px 2px #bbbbbb;
}
</style>
<body>
<details>
<summary>Epcot Center</summary>
<p>Epcot is a theme park at Walt Disney World Resort featuring exciting attractions, international pavilions, award-winning fireworks and seasonal special events.</p>
</details>
</body>
</html>
Example:
HTML
<style>
details {
display: block;
}
</style>
The open
attribute is a boolean attribute.
When present, it specifies that the details should be visible (open) to the user.
The numbers in the table specify the first browser version that fully supports the attribute.
<details open>
Example:
HTML
<details open>
<summary>Epcot Center</summary>
<p>Epcot is a theme park at Walt Disney World Resort featuring exciting attractions, international pavilions, award-winning fireworks and seasonal special events.</p>
</details>
Reffered: https://www.w3schools.com/tags/tag_details.asp
How to create HTML <details> Tag | HTML Tag |
What Type of Browsers will Support for HTML <details> Tag | HTML Tag |
Attributes for HTML <details> Tag | HTML Tag |
How to set Default CSS Settings for HTML <details> Tag | HTML Tag |
How to set Default CSS Settings for HTML <details> Tag | HTML Tag |
How to add HTML <details> open Attribute | HTML Tag |
Read Full: | HTML Tag |
Category: | Web Tutorial |
Sub Category: | HTML Tag |
Uploaded: | 10 months ago |
Uploaded by: | Admin |
Views: | 501 |