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