阅读(2063)

HTML5 <figure> 标签

最后一次修改 2017年08月02日

实例

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>html(html.cn)</title> 
</head>
<body>

<p>The Pulpit Rock is a massive cliff 604 metres (1982 feet) above Lysefjorden, opposite the Kjerag plateau, in Forsand, Ryfylke, Norway. The top of the cliff is approximately 25 by 25 metres (82 by 82 feet) square and almost flat, and is a famous tourist attraction in Norway.</p>

<figure>
  <img src="/statics/images/course/pulpit.jpg" tppabs="http://W3Cschool.com/tags/img_pulpit.jpg" alt="The Pulpit Rock" width="304" height="228">
</figure>

</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例



浏览器支持

IE 9、Firefox、Opera、Chrome 和 Safari 支持 <figure> 标签。

注释:IE 8 或更早版本的 IE 浏览器不支持 <figure> 标签。


标签定义及使用说明

<figure> 标签规定独立的流内容(图像、图表、照片、代码等等)。

<figure> 元素的内容应该与主内容相关,同时元素的位置相对于主内容是独立的。如果被删除,则不应对文档流产生影响。


HTML 4.01 与 HTML5之间的差异

<figure> 标签是 HTML 5 中的新标签。


提示和注释

提示:<figcaption> 元素被用来为 <figure> 元素定义标题。


全局属性

<figure> 标签支持 HTML 的全局属性。


事件属性

<figure> 标签支持 HTML 的事件属性。


实例

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>html(html.cn)</title> 
</head>
<body>

<p>The Pulpit Rock is a massive cliff 604 metres (1982 feet) above Lysefjorden, opposite the Kjerag plateau, in Forsand, Ryfylke, Norway. The top of the cliff is approximately 25 by 25 metres (82 by 82 feet) square and almost flat, and is a famous tourist attraction in Norway.</p>

<figure>
  <img src="/statics/images/course/pulpit.jpg" tppabs="http://W3Cschool.com/tags/img_pulpit.jpg" alt="The Pulpit Rock" width="304" height="228">
</figure>

</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例



浏览器支持

IE 9、Firefox、Opera、Chrome 和 Safari 支持 <figure> 标签。

注释:IE 8 或更早版本的 IE 浏览器不支持 <figure> 标签。


标签定义及使用说明

<figure> 标签规定独立的流内容(图像、图表、照片、代码等等)。

<figure> 元素的内容应该与主内容相关,同时元素的位置相对于主内容是独立的。如果被删除,则不应对文档流产生影响。


HTML 4.01 与 HTML5之间的差异

<figure> 标签是 HTML 5 中的新标签。


提示和注释

提示:<figcaption> 元素被用来为 <figure> 元素定义标题。


全局属性

<figure> 标签支持 HTML 的全局属性。


事件属性

<figure> 标签支持 HTML 的事件属性。