HTML5图形与img的用途是什么 [英] what is the usage of HTML5 figure with img

查看:31
本文介绍了HTML5图形与img的用途是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 HTML5 是否有任何特定的优势/用法<图> <img>?

我认为 <figure> 没有 <figurecaption>,不是吗?

举例说明会很有帮助.

解决方案

从技术上讲,图像不是插入到 HTML 页面中,而是链接到 HTML 页面.<img> 标签为引用的图像创建一个保存空间.

虽然<figure>元素的内容与主流程相关,但其位置与主流程无关,移除后不影响文档的流程p>

来自 http://dev.w3.org/

img 元素代表一个图像. 而 figure 元素代表一个内容单元,可选带有标题,它是自包含的,通常作为单个单元从文档的主要流程中引用,并且可以从文档的主要流程中移开而不影响 文档的含义.

Is there any specific advantage/usage of using HTML5 <figure> over <img>?

I think <figure> is useless without <figurecaption>, isn't it?

It will be helpful if explain with an example.

解决方案

Images are not technically inserted into an HTML page, images are linked to HTML pages. The <img> tag creates a holding space for the referenced image.

While the content of the <figure> element is related to the main flow, its position is independent of the main flow, and if removed it should not affect the flow of the document

From http://dev.w3.org/

The img element represents an image. and the The figure element represents a unit of content, optionally with a caption, that is self-contained, that is typically referenced as a single unit from the main flow of the document, and that can be moved away from the main flow of the document without affecting the document’s meaning.

这篇关于HTML5图形与img的用途是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆