summary element

If you don't know what an element is or how you must use it, I recommend you read the "HTML tags and attributes" tutorial that you can find in the HTML tutorials section.

Description

The summary element represents a summary, caption or legend for the contents of a details element. The description provided by this element will be displayed on top of the contents of the details element for which it has been declared for.

Support for details and summary is incomplete. Authors may have to rely on scripts to achieve the same effect cross-browser.

Examples

In the next example, we'll use a summary element to provide a caption for the contents of a details element. The text in this title proper and concisely describes the rest of the contents of the details element.

<p><b>Cosmos: A Personal Voyage</b> is a thirteen-part television series written by Carl Sagan, Ann Druyan, and Steven Soter, with Sagan as presenter. The series was first broadcast by the Public Broadcasting Service in 1980, and was the most widely watched series in the history of American public television until The Civil War (1990). As of 2009, it was still the most widely watched PBS series in the world.</p>
<details>
  <summary>Carl Sagan</summary>
  <p>Carl Edward Sagan was an American astronomer, cosmologist, astrophysicist, astrobiologist, author, science popularizer, and science communicator in astronomy and other natural sciences. His contributions were central to the discovery of the high surface temperatures of Venus. However, he is best known for his contributions to the scientific research of extraterrestrial life, including experimental demonstration of the production of amino acids from basic chemicals by radiation.</p>
</details>

Cosmos: A Personal Voyage is a thirteen-part television series written by Carl Sagan, Ann Druyan, and Steven Soter, with Sagan as presenter. The series was first broadcast by the Public Broadcasting Service in 1980, and was the most widely watched series in the history of American public television until The Civil War (1990). As of 2009, it was still the most widely watched PBS series in the world.

Carl Sagan

Carl Edward Sagan was an American astronomer, cosmologist, astrophysicist, astrobiologist, author, science popularizer, and science communicator in astronomy and other natural sciences. His contributions were central to the discovery of the high surface temperatures of Venus. However, he is best known for his contributions to the scientific research of extraterrestrial life, including experimental demonstration of the production of amino acids from basic chemicals by radiation.

Attributes

Global attributes

For information about global attributes refer to this list of global attributes in HTML5.

Events

Global events

For information about global events refer to this list of global events in HTML5.