html中的"figure"标记的作用是什么? [英] What is the purpose of the 'figure' tag in html?
问题描述
我正在这样使用<figure>
标记:
<!DOCTYPE html>
<html>
<body>
<figure>
<img src="img.jpg" alt="image" width="204" height="220">
</figure>
</body>
</html>
但是,如果我删除了<figure>
标记,它似乎没有任何区别.有人可以向我解释图形标签的用途是什么吗?
<figure>
标记的全部要点是它是主流的一部分,如果将其删除,则不会影响文档的流程(源 http://www.w3schools.com/tags/tag_figure.asp )>
这就是为什么它主要用于图像,视频,动画等的原因.
基本上,您可以将其视为不影响其子级位置的包装标签
I'm using the <figure>
tag like this:
<!DOCTYPE html>
<html>
<body>
<figure>
<img src="img.jpg" alt="image" width="204" height="220">
</figure>
</body>
</html>
But if I remove the <figure>
tag it doesn't appear to make any difference. Can someone explain to me what the use of the figure tag is?
The whole point of the <figure>
tag is that it is part of the main flow and if removed, it would not affect the flow of the document (source http://www.w3schools.com/tags/tag_figure.asp)
That's why it is mainly used for images, videos, animations etc...
Basically, you can look at it as wrapping tag that doesn't affect the position of its children
这篇关于html中的"figure"标记的作用是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!