如何在 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