加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

html – 正确使用标签,或如何标记“不太重要”的文字

发布时间:2020-12-14 22:22:57 所属栏目:资源 来源:网络整理
导读:另一个在HTML5中被赋予了新意义的标签, small显然生活在: 07000 The small element represents so-called “fine print” or “small print”, such as legal disclaimers and caveats. 这个非官方的参考似乎有点进一步: 07001 small is now for side com
另一个在HTML5中被赋予了新意义的标签,< small>显然生活在:

07000

The small element represents so-called “fine print” or “small print”,
such as legal disclaimers and caveats.

这个非官方的参考似乎有点进一步:

07001

<small> is now for side comments,which are the inline equivalent of
<aside> — content which is not the main focus of the page. A common
example is inline legalese,such as a copyright statement in a page
footer,a disclaimer,or licensing information. It can also be used
for attribution.

我有一个我想显示的人的列表,其中包括他们的真实姓名和昵称。昵称是一种“旁边”,我想用较轻的文本进行风格化:

<li>Laurence Tureaud <small>(Mr.T)</small></li>

我需要为网站的几个部分(人员,产品,位置)做这些事情,所以我正在制定一个明智的标准。我知道我可以使用< span class =“quiet”>或者这样的东西,但是我试图避免任意的类名,并使用正确的HTML元素(如果有的话)。

是< small>适合这个,还是有适当的元素或标记结构?

解决方法

你所看的规格是旧的,你应该看看HTML5规范:

https://html.spec.whatwg.org/multipage/

我建议< em>这里而不是小:

<p>Laurence Tureaud also called <em>Mr. T</em> is famous for his role
in the tv series A-TEAM.</p>

<小>在文章中不常用,但像这样:

<footer>
    <p>
    Search articles about <a href="#">Laurence Tureaud</a>,<small>or try <a href="#">articles about A-TEAM</a>.</small>
    </p>
</footer>

<footer>
    <p>
    Call the Laurence Tureaud's "life trainer chat line" at
    555-1122334455 <small>($1.99 for 1 minute)</small>
    </p>
</footer>

文章:

<p>
    My job is very interesting and I love it: I work in an office
    <small>(123 St. Rome,Italy)</small> with a lot of funny guys that share
    my exact interests.
</p>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读