当前位置:首页>-独立的引用单元-html5文本内容

-独立的引用单元-html5文本内容

  • 更新时间 2025-07-22 15:42:10

版本:HTML5

HTML元素代表一段独立的内容,经常与说明配合使用,并且作为一个独立的引用单元。当它属于主内容流时,它的位置独立于主体。这个标签经常是在主文中引用的图片,插图,表格,代码段等等,当这部分转移到附录中或者其他页面时不会影响到主体。

-独立的引用单元-html5文本内容

浏览器支持

IE 9、Firefox、Opera、Chrome 和 Safari 支持标签。
注释:IE 8 或更早版本的 IE 浏览器不支持标签。

示例

使用元素标记文档中的一个图像:

标签定义及使用说明

  • 标签规定独立的流内容(图像、图表、照片、代码等等)。
  • 元素的内容应该与主内容相关,同时元素的位置相对于主内容是独立的。可以移动到文档的另一部分或附录而不影响主流程。如果被删除,则不应对文档流产生影响。
  • 标签用于对元素进行组合。通过在中插入标题(作为第一个或最后一个子元素),可以将标题与元素相关联。
内容分类允许的内容标签省略允许的父元素允许的 ARIA rolesDOM 实例
流式内容元素,章节内容元素,可触摸内容元素
Aelement, followed byflow content; or flow content followed by aelement; or flow content.
不允许,开始标签和结束标签都不能省略。
所有接受流式内容元素的元素
group,presentation
HTMLElement

HTML 4.01 与 HTML5之间的差异

标签是 HTML 5 中的新标签。

属性

此元素只包含全局属性。

全局属性

标签支持HTML 的全局属性。

事件属性

标签支持HTML 的事件属性。

例子

图像

mdn logo

代码段

get browser details using navigator. function navigatorexample() {var txt;txt = "browser codename: " + navigator.appcodename;txt+= "browser name: " + navigator.appname;txt+= "browser version: " + navigator.appversion ;txt+= "cookies enabled: " + navigator.cookieenabled;txt+= "platform: " + navigator.platform;txt+= "user-agent header: " + navigator.useragent;}

引用内容

edsger dijkstra:if debugging is the process of removing software bugs,then programming must be the process of putting them in.

诗歌

bid me discourse, i will enchant thine ear, or like a fairy trip upon the green,or, like a nymph, with long dishevell'd hair, dance on the sands, and yet no footing seen:love is a spirit all compact of fire, not gross to sink, but light, and will aspire.

venus and adonis, by william shakespeare

最新文章

随机文章