我应该为员工页面使用<figure>和<figcaption>标签吗?

时间:2016-06-03 06:27:56

标签: html5

我会得到<figure><figcaption>的用途。如果我有一个员工页面,将它用于员工图像在语义上是否正确?

好像我有两个选择:

  <figure>   
    <img src="bill_carpenter.png">   
    <figcaption>Bill Carpenter</figcaption> 
  </figure>

<div>
  <img src="bill_carpenter.png">
  <p>Bill Carpenter</p>
</div>

1 个答案:

答案 0 :(得分:1)

defining standard says

  

figure元素的内容是周围流程的一部分。如果页面的目的是显示图形,例如图像共享网站上的照片,figurefigcaption元素可用于明确提供该图形的标题。

所以,是的,如果目的是显示Bill的标题照片,使用<figure>是完全合适的。

相关问题