Html 简明教程
HTML - Fonts Reference
字体特定于平台。在运行不同操作系统(如 Windows、Linux 或 Mac iOS)的不同设备上,您会看到不同的网页外观和感觉。这里提供了一份在各种操作系统中可用的字体列表。
Fonts are specific to platform. You will have different look and feel of a web page on different machines running different operating systems like Windows, Linux or Mac iOS. Here we are giving a list of fonts which are available in various operating systems.
HTML <font> 标签已在 4.0 版以后弃用,现在所有字体都通过使用 CSS 设置。以下是设置网页正文字体格式的简单语法。
HTML <font> tag is deprecated in version 4.0 onwards and now all fonts are set by using CSS. Here is the simple syntax of setting font of a body of web page.
Syntax
body {
font-family: "new century schoolbook";
}
<body style = "font-family:new century schoolbook;">
HTML font Tag
HTML * <font>* 标签已在最新版本 HTML 中弃用。在旧版本中,font 标签可用于向您网站上的文本添加样式、大小和颜色。您可以使用 <basefont> 标签将所有文本设置为相同的大小、字体和颜色。HTML font 标签有三个属性(size、color 和 face)来自定义字体。
HTML <font> tag is deprecated in latest versions of HTML. In older versions font tag can be used to add style, size, and color to the text on your website. You can use a <basefont> tag to set all of your text to the same size, face, and color. HTML font tag have three attributes called size, color, and face to customize your fonts.
Web safe fonts
CSS3 已采用字体组合技术。如果浏览器不支持第一种字体,它将尝试使用下一种字体。以下是 CSS Web Safe Fonts. 的列表
CSS3 has adapted font combinations technology. If the browser doesn’t support the first font then it tries the next font. Here is the list of CSS Web Safe Fonts.
Example of HTML Fonts
我们来看一下在 HTML 文档中使用字体的一个基本示例
Let’s look at the basic example of the usage of the fonts in the HTML document
<!DOCTYPE html>
<html>
<head>
<title>Font Setting Using CSS</title>
</head>
<body>
<p>
Change any of the style and try it.
</p>
<div style="font-family:verdana;">
This is demo for font family
</div>
<br />
<div style="font-size:120%;">
This is demo for font size
</div>
<br />
<div style="font-size:14pt;">
This is demo for font size
</div>
</body>
</html>
当我们运行以上代码时,输出窗口将弹出,显示网页上显示了不同字体的文本。
When we run the above code, the output window will pop up displaying the text with different fonts displayed on the webpage.
Fonts for Microsoft Systems
以下是 Microsoft 系统支持的字体列表:
Following are the fonts for Microsoft Systems listed below −
Font |
Font |
Font |
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 Fonts Examples* 。
You can check example fonts here Microsoft Fonts Examples.
Fonts for Macintosh Systems
以下是在 Mac 系统 7 及更高版本中支持的字体列表。
Following is the list of fonts supported by Macintosh System 7 and higher versions.
Font |
Font |
Font |
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 Fonts Examples* 。
You can check example fonts here Mac Fonts Examples.
Fonts for Unix Systems
以下是在大多数 Unix 系统版本中支持的字体列表
Following is the list of fonts supported by most Unix System variants
Font |
Font |
Font |
Charter |
Clean |
Courier |
Fixed |
Helvetica |
Lucida |
Lucida bright |
Lucida Typewriter |
New Century Schoolbook |
Symbol |
Terminal |
Times |
Utopia |
你可以在这里查看示例字体 * Unix Fonts Examples* 。
You can check example fonts here Unix Fonts Examples.