How to display a summary for a given <details> in HTML5?

HTMLFront End TechnologyWeb Development

Use the <summary> tag to specify a summary for the details added using <details> tag.

Example

You can try to run the following code to display a summary in HTML5 −

<!DOCTYPE html>
<html>
   <head>
      <title>HTML Summary Tag</title>
   </head>
   <body>
      <details>
         <summary>Some More Information</summary>
         <p>Providing more info about the details here.</p>
      </details>
   </body>
</html>
raja
Published on 13-Mar-2018 10:17:10
Advertisements