<small>:備註元素
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
<small>
HTML 元素表示側注和小字印刷,如版權和法律文本,獨立於其風格化呈現。默認情況下,它以比其中的文本小一號的字體大小呈現,例如從 small
到 x-small
。
嘗試一下
<p>
MDN Web Docs is a learning platform for Web technologies and the software that
powers the Web.
</p>
<hr />
<p>
<small
>The content is licensed under a Creative Commons Attribution-ShareAlike 2.5
Generic License.</small
>
</p>
small {
font-size: 0.7em;
}
屬性
此元素僅包括全域屬性。
範例
>基本使用
html
<p>
This is the first sentence.
<small>This whole sentence is in small letters.</small>
</p>
結果
CSS 替代方法
html
<p>
This is the first sentence.
<span style="font-size:0.8em">This whole sentence is in small letters.</span>
</p>
結果
注意事項
儘管 <small>
元素,像 <b>
和 <i>
元素一樣,可能被認為違反結構和表示之間的分離原則,這三者在 HTML 中都是有效的。鼓勵作者在確定使用 <small>
還是 CSS 時應據其最佳判斷。
技術摘要
規範
Specification |
---|
HTML> # the-small-element> |
瀏覽器相容性
Loading…