<details>

Description

The <details> element marks a section that the user can expand to get further details. The <details> element usually contains a summary element. The <summary> element creates a label or title for the details section.

Example


<!DOCTYPE HTML> 
<html> 
<head> 
<style> 
details {border: solid thin black; padding: 5px}
details > summary { font-weight: bold} 
</style> <!--from w w w.j  a  v  a2 s  .  c  o  m-->
</head> 
<body> 
    <details> 
        <summary>Title</summary> 
        Details Details Details Details Details Details Details 
        Details Details Details Details Details Details Details 
        <ol> 
            <li>A</li> 
            <li>B</li> 
            <li>C</li> 
        </ol> 
</details> 
</body> 
</html> 

Click to view the demo

The code above generates the following result.

details




















Home »
  HTML CSS »
    HTML CSS Reference »




HTML Tag Reference
CSS Reference
CSS Selector Reference
Encoding Reference