📜  HTML-字体参考

📅  最后修改于: 2020-12-16 06:01:01             🧑  作者: Mango


字体特定于平台。在运行不同操作系统(例如Windows,Linux或Mac iOS)的不同计算机上,您将具有不同的网页外观。在这里,我们列出了各种操作系统中可用的字体。

HTML 标记在版本4.0及更高版本中已弃用,现在所有字体都使用CSS设置。这是设置网页正文字体的简单语法。

body {
   font-family: "new century schoolbook";
}  
or  

Font Setting Using CSS
   

   
      

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系统的字体

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字体示例

Macintosh系统的字体

以下是Macintosh System 7和更高版本支持的字体列表

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字体示例

Unix系统字体

以下是大多数Unix系统变体支持的字体列表

Font Font Font
Charter Clean Courier
Fixed Helvetica Lucida
Lucida bright Lucida Typewriter New Century Schoolbook
Symbol Terminal Times
Utopia

您可以在此处检查示例字体-Unix字体示例

HTML ASCII码

有2个7 = 128个可打印字符,可以用不同的7位ASCII码表示。另一组字符不是用于HTML表示,而是设计用于控制硬件。

下表列出了所有7位ASCII代码及其等效的HTML实体代码。

如果要查看等效的十六进制,OCT和扩展的ASCII代码集,请查看下一章。

7位可打印ASCII字符

ASCII Characters Description HTML Entity Codes
  space
! exclamation mark !
" quotation mark "
# number sign #
$ dollar sign $
% percent sign %
& ampersand &
' apostrophe '
( left parenthesis (
) right parenthesis )
* asterisk *
+ plus sign +
, comma ,
- hyphen -
. period .
/ slash /
0 digit 0 0
1 digit 1 1
2 digit 2 2
3 digit 3 3
4 digit 4 4
5 digit 5 5
6 digit 6 6
7 digit 7 7
8 digit 8 8
9 digit 9 9
: colon :
; semicolon ;
< less-than <
= equals-to =
> greater-than >
? question mark ?
@ at sign @
A uppercase A A
B uppercase B B
C uppercase C C
D uppercase D D
E uppercase E E
F uppercase F F
G uppercase G G
H uppercase H H
I uppercase I I
J uppercase J J
K uppercase K K
L uppercase L L
M uppercase M M
N uppercase N N
O uppercase O O
P uppercase P P
Q uppercase Q Q
R uppercase R R
S uppercase S S
T uppercase T T
U uppercase U U
V uppercase V V
W uppercase W W
X uppercase X X
Y uppercase Y Y
Z uppercase Z Z
[ left square bracket [
\ backslash \
] right square bracket ]
^ caret ^
_ underscore _
` grave accent `
a lowercase a a
b lowercase b b
c lowercase c c
d lowercase d d
e lowercase e e
f lowercase f f
g lowercase g g
h lowercase h h
i lowercase i i
j lowercase j j
k lowercase k k
l lowercase l l
m lowercase m m
n lowercase n n
o lowercase o o
p lowercase p p
q lowercase q q
r lowercase r r
s lowercase s s
t lowercase t t
u lowercase u u
v lowercase v v
w lowercase w w
x lowercase x x
y lowercase y y
z lowercase z z
{ left curly brace {
| vertical bar |
} right curly brace }
~ tilde ~

7位ASCII设备控制字符

ASCII Characters Description HTML Entity Codes
NUL null character
SOH start of header 
STX start of text 
ETX end of text 
EOT end of transmission 
ENQ enquiry 
ACK acknowledge 
BEL bell (ring) 
BS backspace 
HT horizontal tab
LF line feed
VT vertical tab
FF form feed
CR carriage return
SO shift out 
SI shift in 
DLE data link escape 
DC1 device control 1 
DC2 device control 2 
DC3 device control 3 
DC4 device control 4 
NAK negative acknowledge 
SYN synchronize 
ETB end transmission block 
CAN cancel 
EM end of medium 
SUB substitute 
ESC escape 
FS file separator 
GS group separator 
RS record separator 
US unit separator 
DEL delete (rubout)