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

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

概述我正在编写一个带有侧面注释的在线教程,或者他们称之为“admonitions”,类似于Django教程中的那些: https://docs.djangoproject.com/en/dev/intro/tutorial01/(我的意思是带有绿框的框和一个音符图标). 我应该使用哪个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”.

总结

以上是内存溢出为你收集整理的哪个语义HTML标签用于显示旁注警告?全部内容,希望文章能够帮你解决哪个语义HTML标签用于显示旁注和警告?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1144240.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-31
下一篇 2022-05-31

发表评论

登录后才能评论

评论列表(0条)

保存