html5中的<figure>标签可用于背景图片吗?

aur*_*rel 3 html accessibility

我开始阅读html5,我正在尝试一个项目,以便我可以看到事情是如何工作的.我知道标签可以像这样使用:

<figure id="car">
   <img src="img/car.jpg" alt="the car">
   <p>The car</p>
</figure>
Run Code Online (Sandbox Code Playgroud)

虽然我需要有6个这样的数字,因此我想使用精灵和(除非我不知道重要的事情)精灵只有在我添加图像宽度css(背景图像)时才有效.所以我会做的是:

<figure id="car">
   <pre></pre> <!-- add image from css -->
   <p>The car</p>
</figure>
Run Code Online (Sandbox Code Playgroud)

我可以使用这样的数字标签吗?

非常感谢

Ste*_*ams 9

图形和figcaption元素在语义上非常具体.如果你不关心语义,那么使用它们真的没什么理由.Divs工作正常.这是应该如何使用数字:

<figure>
  <img src="/image.jpg" alt="A description of what this image is">
  <figcaption>A description that may or may not describe the image specifically and accompanies content from within the article.</figcaption>
</figure>
Run Code Online (Sandbox Code Playgroud)

编辑:我应该提一下,带有背景的pre可能不是如何使用它,并且根本不会帮助屏幕阅读器的人.搜索引擎的机器人也可能有不同的反应,这可能对你不利.