如何在 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>
廣告
資料結構
網路
RDBMS
作業系統
Java
iOS
HTML
CSS
Android
Python
C 程式設計
C++
C#
MongoDB
MySQL
JavaScript
PHP