微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

哪个语义HTML标签用于显示旁注和警告?

我正在编写一个带有侧面注释的在线教程,或者他们称之为“admonitions”,类似于Django教程中的那些:
https://docs.djangoproject.com/en/dev/intro/tutorial01/(我的意思是带有绿框的框和一个音符图标).

我应该使用哪个HTML标记来附加这些注释,以添加注释的语义含义,这对于在教程的给定点读取可能很有用,但不是主要教程流程的一部分?

值得注意的是,标签必须允许封闭块元素.

解决方法

在HTML5中(由所有现代浏览器支持),标签放在一边.

http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-aside-element开始:

The aside element represents a section of a page that consists of
content that is tangentially related to the content around the aside
element,and which Could be considered separate from that content.
Such sections are often represented as sidebars in printed typography.

The element can be used for typographical effects like pull quotes or
sidebars,for advertising,for groups of nav elements,and for other
content that is considered separate from the main content of the page.

It’s not appropriate to use the aside element just for parentheticals,
since those are part of the main flow of the document.

这是一个块级元素,并且通常可以包含任何块级元素(即几乎任何东西).它本质上是一个“语义div”.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐