HTML 5 | <summary> Tag

The <summary> tag in HTML is used to define a summary for the <details> element.

  • The <summary>> element is used along with the <details> element and provides a summary visible to the user.
  • When the summary is clicked by the user, the content placed inside the <details> element becomes visible which was previously hidden.
  • The <summary> tag was added in HTMl 5.
  • The <summary> tag requires both starting and ending tag.

Syntax:

<summary> Content whoso summary is required </summary>

Below program illustrates the <summary> element:



Input :

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
<body>
  
<details>
  <summary>GeeksforGeeks.</summary>
  <p> It is a portal for geeks.</p>
</details>
  
</body>
</html>

chevron_right


Output :

Supported Browser: Supported browsers are listed below

  • Google Chrome 12.0
  • Firefox 48.0
  • Opera 15.0
  • Safari 6.0


My Personal Notes arrow_drop_up

I am a technology enthusiast who has a keen interest in programming I am pursuing Engineering in Computer Science from GEU, Dehradun I like to unwind by watching movies and English sitcomsI have a keen interest in music

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



Improved By : nidhi_biet



Article Tags :
Practice Tags :


1


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.