HTML <figure>标签用于在网页文档中标记一张照片。

我们知道,在HTML中已经有一个<img>标签用于显示图片。但是HTML5中的<figure>标签用于处理一组图表、照片、代码清单等与一些嵌入内容相关的内容。你还可以借助<figcaption>标签为照片添加标题。

HTML <figure>是HTML5中引入的一个新标签。

HTML <figure>标签示例

<p>The Taj Mahal is widely recognized as "the jewel of Muslim art in India and
one of the universally admired masterpieces of the world's heritage". It is regarded
by many as the finest example of Mughal architecture, a style that combines elements
from Islamic, Persian, Ottoman, Turkish and Indian architectural styles.</p>
<figure>
  <img src="http://www.javatiku.cn" alt="Taj Mahal">
</figure>

注意:你放在<figure>...</figure>标签中的内容与主要内容相关,但其位置独立于主要内容,当移除时不会影响文档的流程。

支持的浏览器

元素chrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<figure>

注意:HTML <figure>标签还支持HTML中的全局属性和事件属性。

标签: html, HTML教程, HTML技术, HTML学习, HTML学习教程, HTML下载, HTML语言, HTML开发, HTML入门教程, HTML进阶教程, HTML高级教程, HTML面试题, HTML笔试题, HTML编程思想