logo
HTML5 Summary Tag
The <summary> tag is used along with the <details> element to provide a summary visible to the user. When the user clicks the summary, the additional information or content placed inside the <details> element which was previously hidden becomes visible.
Example :
<!DOCTYPE html>
<html lang="en">
    <head>
       <title>HTML5 summary Tag</title>
    </head>
    
    <body>
        <details>
            <summary>What is HTML?</summary>
            <p>HyperText Markup Language (HTML) is the standard markup language for creating web pages and web applications. With Cascading Style Sheets (CSS), and JavaScript, it forms a triad of cornerstone technologies for the World Wide Web.</p>
        </details>
    </body>
    
</html>    
Output :
What is HTML?

HyperText Markup Language (HTML) is the standard markup language for creating web pages and web applications. With Cascading Style Sheets (CSS), and JavaScript, it forms a triad of cornerstone technologies for the World Wide Web.