SHARE
Facebook X Pinterest WhatsApp

Summarizing Your Topic Using the Summary Markup Element in HTML5 Web Pages

Written By
thumbnail
Vipul Patel
Vipul Patel
Nov 20, 2013

Introduction

One of the new markup elements introduced in HTML5 is the summary markup element.

As the name suggests, the summary markup element is an interactive markup element used to represent summary context of your web page.

 

The HTML5 specification says…

The HTML5 specification for summary markup element http://www.w3.org/TR/html-markup/summary.html specifies that the element can be used to represent a summary, caption or legend.

It also mandates that the summary markup element must have both a starting and an ending tag.

The summary markup element can also be inside a details markup element. When inside a details markup element, the summary element is visible irrespective of whether the open attribute of the details markup element is specified or not.

 

Hands-On

Let us write a simple HTML5 web page that uses a summary markup element.

 

<!DOCTYPE html>

<html>

<meta charset=”utf-8″>

<title>Summary sample</title>

<body>

    <header>

        <h1>Summary markup element sample</h1>

        <p>Demo showing summary markup element</p>

    </header>

    <summary>Summary element outside details markup element.</summary>

    <details open>

        <summary>Another Summary markup element inside details markup element</summary>

    </details>

    <footer>

        <p>HTML Goodies</p>

    </footer>

</body>

</html>

 

The web page is rendered in Google Chrome as under.

 

Summary

In this article, we saw how simple it was to use the summary markup element in a HTML5 web page. You can download the sample code from <download link>.

 

References

http://www.w3.org/TR/html-markup/summary.html

 

About the author

Vipul Patel is a Program Manager currently working at Amazon Corporation. He has formerly worked at Microsoft in the Lync team and in the .NET team (in the Base Class libraries and the Debugging and Profiling team). He can be reached at vipul.patel@hotmail.com

Recommended for you...

Best VR Game Development Platforms
Enrique Corrales
Jul 21, 2022
Best Online Courses to Learn HTML
Ronnie Payne
Jul 7, 2022
Working with HTML Images
Octavia Anghel
Jun 30, 2022
Web 3.0 and the Future Of Web Development
Rob Gravelle
Jun 23, 2022
HTML Goodies Logo

The original home of HTML tutorials. HTMLGoodies is a website dedicated to publishing tutorials that cover every aspect of being a web developer. We cover programming and web development tutorials on languages and technologies such as HTML, JavaScript, and CSS. In addition, our articles cover web frameworks like Angular and React.JS, as well as popular Content Management Systems (CMS) that include WordPress, Drupal, and Joomla. Website development platforms like Shopify, Squarespace, and Wix are also featured. Topics related to solid web design and Internet Marketing also find a home on HTMLGoodies, as we discuss UX/UI Design, Search Engine Optimization (SEO), and web dev best practices.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.