Home  >  Article  >  Web Front-end  >  How to use html summary tag

How to use html summary tag

藏色散人
藏色散人Original
2019-05-28 10:44:093659browse

html The summary tag contains the title of the details element. The "details" element is used to describe detailed information about the document or document fragment. Please use it with the

tag. The title is visible and details are displayed when the user clicks on the title.

How to use html summary tag

#html How to use summary tag?

Role: Contains the title of the details element. The "details" element is used to describe detailed information about the document or document fragment.

Description: The

tag is a new tag in HTML 5.

Note: Please use with

tag. The title is visible and details are displayed when the user clicks on the title. The "summary" element should be the first child of the "details" element. The tag is only supported in Chrome and Safari 6.

html summary tag usage example 1

<!DOCTYPE HTML>
<html>
<body>
<details>
<summary>HTML 5</summary>
This document teaches you everything you have to learn about HTML 5.
</details>
</body>
</html>

Effect output:

How to use html summary tag

html summary tag usage Example 2

<!DOCTYPE HTML>
<html>
<body>
<details>
<summary>西门大官人</summary>
西门大官人是php中文网的高级讲师,拥有7年的php开发经验。
</details>
</body>
</html>

Effect output:

How to use html summary tag

The above is the detailed content of How to use html summary tag. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn