Home >>HTML5 Tutorial >HTML5 <summary> Tag

HTML5 <summary> Tag

HTML 5 <summary> Tag

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

  • Basically, The <summary> element is used along with the <details> element and provides the summary visible to the user.
  • When the summary is clicked by the user, the content inside the <details> element becomes visible.
  • The <summary> tag requires both opening and closing tag .

Syntax: <summary> put Content which summary is required <summary>

Let's take an Example of HTML 5 <summary> Tag:

<!DOCTYPE html> 
<html> 
<body> 
<details> 
<summary>Phptpoint</summary> 
<p>Welcome to Phptpoint tutorial</p> 
</details> 
</body> 
</html>
Output:
Phptpoint

Welcome to Phptpoint tutorial


No Sidebar ads