在本文中,我们将学习如何为元素定义可见标题。此元素用于创建一个小部件,该小部件在处于“打开”状态时显示信息。可以通过单击元素来切换状态。必须显示的内容包含在标签中。
方法: 元素的第一个子元素是
句法:
Heading Summary One
This is the content for heading one.
示例:以下示例说明了用于定义元素标题的
HTML
GeeksforGeeks
How to define a visible heading for
a element in HTML5?
Heading Summary One
This is the content for heading one. The
content outside the tag
is displayed here.
Heading Summary Two
This is the content for heading two. The
content outside the tag
is displayed here.
Heading Summary Three
This is the content for heading three. The
content outside the tag
is displayed here.
输出: