Last Updated on April 26, 2023 by Roshan Parihar
HTML summary tag is used to show heading for details element in HTML . This tag can be used to create accordion widget which shows content on toggle open and close.
Syntax
1 |
<summary>Enter summary content here...</summary> |
1 2 3 4 |
<details> <summary>title one</summary> <p>This is the content in details element.</p> </details> |
Output
title one
This is the content in details element.
Resources and References of HTML summary tag
1. W3C Specification.
2. HTML living standard
3. W3C project using Github