如何在 HTML 中使用小字型?


HTML 中的 <small> 標記使 HTML 文件中的字型大小變小(比原始字型小一個大小)。

HTML <small> 標記位於 <body> 標記內。<small> 標記使文字的大小變小一個單位。

語法

以下是 <small> 標記的語法。

<small>The text…</small>

示例

以下是 <small> 標記的示例程式。

<!DOCTYPE html> <html> <body> <h1>Tutorials <small>point</small></h1> </body> </html>

示例

我們可以在 HTML 元素中使用 <small> 標記。以下是在 <p> 標記內使用 <small> 標記的示例程式。

<!DOCTYPE html> <html> <head> </head> <body> <p>DLF stands for <small>Delhi Land and Finance.</small> <br> Delhi Land and Finance is one of the largest commercial real estate developer in India.</p> </body> </html>

示例

以下是示例程式,使用 CSS 屬性定義 HTML 中的較小文字。我們還可以使用 CSS 屬性定義較小的文字。

<!DOCTYPE html> <html> <head> <style> span.small{ font-size: smaller; } </style> </head> <body> <p> <span class="small">DLF stands for Delhi Land and Finance.</span></p> <p> Delhi Land and Finance is one of the largest commercial real estate developer in India.</p> </body> </html>

更新於: 2022-11-11

264 次瀏覽

開啟你的 職業生涯

透過完成課程獲得認證

開始吧
廣告
© . All rights reserved.