字体特定于平台。在运行不同操作系统(如 Windows、Linux 或 Mac iOS)的不同机器上,您将拥有不同的网页外观。在这里,我们给出了各种操作系统中可用的字体列表。
HTML 标签在 4.0 版本中已弃用,现在所有字体都使用 CSS 设置。这是设置网页正文字体的简单语法。
语法
在 HTML 中:
在 CSS 中:
body { font-family: "new century schoolbook"; }
HTML font 标签
HTML 标签在最新版本的 HTML 中已弃用。在旧版本中,字体标签可用于为网站上的文本添加样式、大小和颜色。您可以使用
HTML 字体标签具有三个属性,分别称为大小、颜色、字体,用于自定义字体。
探索我们最新的在线课程,按照自己的节奏学习新技能。注册并成为认证专家,以提升您的职业生涯。
Web 安全字体
CSS3 采用了字体组合技术。如果浏览器不支持第一种字体,则尝试使用下一种字体。这是CSS Web安全字体的列表。
HTML 字体示例
让我们看一下 HTML 文档中字体使用的基本示例
Change any of the style and try it.
This is demo for font family
This is demo for font size
This is demo for font size
当我们运行上述代码时,将弹出输出窗口,显示网页上显示不同字体的文本。
Microsoft 系统的字体
以下是下面列出的 Microsoft 系统的字体:
字体
字体
字体
Andale Mono
Arial
Arial Bold
Arial Italic
Arial Bold Italic
Arial Black
Comic Sans MS
Comic Sans MS Bold
Courier New
Courier New Bold
Courier New Italic
Courier New Bold Italic
Georgia
Georgia Bold
Georgia Italic
Georgia Bold Italic
Impact
Lucida Console
Lucida Sans Unicode
Marlett
Minion Web
Symbol
Times New Roman
Times New Roman Bold
Times New Roman Italic
Times New Roman Bold Italic
Tahoma
Trebuchet MS
Trebuchet MS Bold
Trebuchet MS Italic
Trebuchet MS Bold Italic
Verdana
Verdana Bold
Verdana Italic
Verdana Bold Italic
Webdings
您可以在此处查看示例字体 Microsoft 字体示例。
Macintosh 系统的字体
以下是 Macintosh System 7 及更高版本支持的字体列表。
字体
字体
字体
American Typewriter
Andale Mono
Apple Chancery
Arial
Arial Black
Brush Script
Baskerville
Big Caslon
Comic Sans MS
Copperplate
Courier New
Gill Sans
Futura
Herculanum
Impact
Lucida Grande
Marker Felt
Optima
Trebuchet MS
Verdana
Webdings
Palatino
Symbol
Times
Osaka
Papyrus
Times New Roman
Textile
Zapf Dingbats
Zapfino
Techno
Hoefler Text
Skia
Hoefler Text Ornaments
Capitals
Charcoal
Gadget
Sand
您可以在此处查看示例字体 Mac 字体示例。
Unix 系统的字体
以下是大多数 Unix 系统变体支持的字体列表
字体
字体
字体
Charter
Clean
Courier
Fixed
Helvetica
Lucida
Lucida bright
Lucida Typewriter
New Century Schoolbook
Symbol
Terminal
Times
Utopia
您可以在此处查看示例字体 Unix 字体示例。
<< HTML - 事件参考
HTML - ASCII 代码参考 >>