HTML <summary> tag

HTML <summary> tag : Definition


• The HTML <summary> tag is defined as the child of <details> element to provide a summary of the contents of the <details> element.

• When the summary is clicked by the user, the content placed inside the <details> <element> is displayed which is hidden by default.



Html <summary> tag example

<!DOCTYPE html>
<html>
<head>
<title>summary Tag example</title>
</head>
<body>
 <p>The chemical formula for Sulphuric acid is: H<summary>2</summary>SO<summary>4</summary></p>
 <p>The chemical formula for Salt is: N<summary>a</summary>CL</p>
 





 <p>The chemical formula for Water is: H<summary>2</summary>O</p>
 <p>The chemical formula for carbon dioxide is: CO<summary>2</summary></p> 
</body>
</html>


Output :


 
Privacy Policy!

Thank you for using aimtocode !

Thank you for joining us online learning portal. We at aimtocode, Inc. (“aimtocode”, “we”, “us”) respect your privacy and want you to understand how we collect, use, and share data about you. This Privacy Policy covers our data collection practices and describes your rights to access, correct, or restrict our use of your personal data.