Movatterモバイル変換


[0]ホーム

URL:


  1. 給開發者的 Web 技術文件
  2. HTML:超文本標記語言
  3. HTML 參考
  4. Elements
  5. <small>

此頁面由社群從英文翻譯而來。了解更多並加入 MDN Web Docs 社群。

View in EnglishAlways switch to English

<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 元素表示側注和小字印刷,如版權和法律文本,獨立於其風格化呈現。默認情況下,它以比其中的文本小一號的字體大小呈現,例如從smallx-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>This whole sentence is in small letters.</span></p>

結果

注意事項

儘管<small> 元素,像<b><i> 元素一樣,可能被認為違反結構和表示之間的分離原則,這三者在 HTML 中都是有效的。鼓勵作者在確定使用<small> 還是 CSS 時應據其最佳判斷。

技術摘要

內容類別流內容段落型內容
允許的內容段落型內容
標籤省略不允許,必須有開始標籤和結束標籤。
允許的父元素 任何接受段落型內容的元素,或任何接受流內容的元素。
隱含的 ARIA 角色generic
允許的 ARIA 角色任何
DOM 介面HTMLElement

規範

Specification
HTML
# the-small-element

瀏覽器相容性

參見

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp