<small>:侧面注释元素

<small> HTML 元素代表旁注和小字,如版权和法律文本,与其样式表示无关。默认情况下,它会将其中的文本渲染为小一号的字体,例如从 smallx-small

¥The <small> HTML element represents side-comments and small print, like copyright and legal text, independent of its styled presentation. By default, it renders text within it one font-size smaller, such as from small to x-small.

Try it

属性

¥Attributes

该元素仅包含 全局属性

¥This element only includes the global attributes.

示例

¥Examples

基本用法

¥Basic usage

html
<p>
  This is the first sentence.
  <small>This whole sentence is in small letters.</small>
</p>

结果

¥Result

CSS 替代方案

¥CSS alternative

html
<p>
  This is the first sentence.
  <span style="font-size:0.8em">This whole sentence is in small letters.</span>
</p>

结果

¥Result

注意

¥Notes

尽管 <small> 元素与 <b><i> 元素一样,可能被认为违反了结构与表示分离的原则,但这三个元素在 HTML 中都是有效的。我们鼓励作者在确定是使用 <small> 还是 CSS 时使用他们的最佳判断。

¥Although the <small> element, like the <b> and <i> elements, may be perceived to violate the principle of separation between structure and presentation, all three are valid in HTML. Authors are encouraged to use their best judgement when determining whether to use <small> or CSS.

技术总结

¥Technical summary

内容类别 流量内容, 措辞内容.
允许的内容 措辞内容
标签遗漏 没有任何;必须同时具有开始标记和结束标记。
允许的父级 任何接受 措辞内容 的元素,或任何接受 流动内容 的元素。
隐式 ARIA 角色 generic
允许的 ARIA 角色 任何
DOM 接口 HTMLElement

规范

Specification
HTML Standard
# the-small-element

¥Specifications

浏览器兼容性

BCD tables only load in the browser

¥Browser compatibility

也可以看看

¥See also