阅读(1886)

HTML5 <figcaption> 标签

最后一次修改 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" alt="The Pulpit Rock" width="304" height="228">
  <figcaption>Fig.1 - A view of the pulpit rock in Norway.</figcaption>
</figure>

</body>
</html>

运行实例 »

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


浏览器支持

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

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


标签定义及使用说明

<figcaption> 标签为 <figure> 元素定义标题。

<figcaption> 元素应该被置于 <figure> 元素的第一个或最后一个子元素的位置。


HTML 4.01 与 HTML5之间的差异

<figcaption> 标签是 HTML5 中的新标签。


全局属性

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


事件属性

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