HTML <summary> Tag

<summary> tag is used to define the visible header for the <details> element. By clicking on the header the user can view/hide the information.

<summary> element always should be the first element inside <details> tag.

<summary> tag is new to HTML5. It is not supported by the browsers Internet explorer and Edge.


The content of the tag is between the opening (<summary>) and closing (</summary>) tag.


<!DOCTYPE html>
      <summary>Copyright 2013-2014.</summary>
      <p> W3docs. All rights reserved.</p>
      <p>The content of the website is the property of</p>

Attributes of <summary> tag

<summary> tag supports Global Attributes.