HTML SUMMARY Tag || Summary Tag in HTML
×

HTML SUMMARY Tag

0 428

The HTML SUMMARY tag is always used with details tag. The summary element must be the first child of a tag. It is used within the tag.

The summary element is used as a summary, caption, heading or legend for the content of a details element.

The <summary></summary> tag is new in HTML5.

Syntax:

The <summary> tag is written as <summary></summary> with the summary/legend inserted between the start and end tags.

Program:

<!DOCTYPE html>
<html>
<head>
<title>HTML Summary Tag</title>
</head>
<body>
<h2>Example of Summary Tag</h2>
<details>
<summary>Coding Tag Summary</summary>
<p>Coding Tag is a popular tutorial website.</p>
<p>You can learn various tutorials on Coding Tag such as HTML, CSS, JavaScript, JQuery, PHP, etc.</p>
</details>
</html>

Output:




Share:


Leave a Reply


Comments
    Waiting for your comments