SEO中国站 | SEO站长社区      SEO中国站专注为企业提供搜索引擎优化(SEO)服务,中国SEO服务诚信高效品牌      关于我们 | 客户服务 | SEO博客 | 加入收藏 | RSS订阅

SEO中国站:提供SEO服务|网站优化,搜索引擎优化(SEO)服务专业平台

SEO中国站专业为中小型企业提供SEO服务搜索引擎优化中国SEO在线诚信服务平台,如需更多咨询和交流,请点击客户服务中心交谈,QQ:176128596!
域名主机 网站安全 网站运营 Discuz Shopex Ecshop Dedecms Magento Zencart Wordpress Z-Blog Access/Mysql PHP编程 ASP/ASP.NETHTML/DIV+CSS 电脑安全
返回首页
当前位置: 首页 > 网站建设 > HTML/DIV+CSS >

HTML特殊字符-第四节

时间:2010-03-08 12:06来源:SEO中国站 作者:seocnz 点击:
HTML字符实体(Character Entities) 有些字符在HTML里有特别的含义,比如小于号就表示HTML Tag的开始,这个小于号是不显示在我们最终看到的网页里的。那如果我们希望在网页中显示一个小于号,该怎么办呢? 这就要说到 HTML 字符实体(HTML Character Entities)
  

HTML字符实体(Character Entities)

有些字符在HTML里有特别的含义,比如小于号<就表示HTML Tag的开始,这个小于号是不显示在我们最终看到的网页里的。那如果我们希望在网页中显示一个小于号,该怎么办呢?

这就要说到HTML字符实体(HTML Character Entities)了。

一个字符实体(Character Entity)分成三部分:第一部分是一个&符号,英文叫ampersand;第二部分是实体(Entity)名字或者是#加上实体(Entity)编号;第三部分是一个分号。

比如,要显示小于号,就可以写&lt;或者&#60;。

用实体(Entity)名字的好处是比较好理解,一看lt,大概就猜出是less than的意思,但是其劣势在于并不是所有的浏览器都支持最新的Entity名字。而实体(Entity)编号,各种浏览器都能处理。

SEO中国站提醒:Entity是区分大小写的。

 

如何显示空格

通常情况下,HTML会自动截去多余的空格。不管你加多少空格,都被看做一个空格。比如你在两个字之间加了10个空格,HTML会截去9个空格,只保留一个。为了在网页中增加空格,你可以使用&nbsp;表示空格。

 

最常用的字符实体(Character Entities)

显示结果 说明 Entity Name Entity Number
  显示一个空格 &nbsp; &#160;
< 小于 &lt; &#60;
> 大于 &gt; &#62;
& &符号 &amp; &#38;
" 双引号 &quot; &#34;

 

其他常用的字符实体(Character Entities)

显示结果 说明 Entity Name Entity Number
© 版权 &copy; &#169;
® 注册商标 &reg; &#174;
× 乘号 &times; &#215;
÷ 除号 &divide; &#247;

 

更多字符实体(Character Entities)

字符 十进制字符编号 实体名字 说明
--- &#00; --- 未使用Unused
--- &#01; --- 未使用Unused
--- &#02; --- 未使用Unused
--- &#03; --- 未使用Unused
--- &#04; --- 未使用Unused
--- &#05; --- 未使用Unused
--- &#06; --- 未使用Unused
--- &#07; --- 未使用Unused
--- &#08; --- 未使用Unused
--- &#09; --- 制表符Horizontal tab
--- &#10; --- 换行Line feed
--- &#11; --- 未使用Unused
--- &#12; --- 未使用Unused
--- &#13; --- 回车Carriage Return
--- &#14; --- 未使用Unused
--- &#15; --- 未使用Unused
--- &#16; --- 未使用Unused
--- &#17; --- 未使用Unused
--- &#18; --- 未使用Unused
--- &#19; --- 未使用Unused
--- &#20; --- 未使用Unused
--- &#21; --- 未使用Unused
--- &#22; --- 未使用Unused
--- &#23; --- 未使用Unused
--- &#24; --- 未使用Unused
--- &#25; --- 未使用Unused
--- &#26; --- 未使用Unused
--- &#27; --- 未使用Unused
--- &#28; --- 未使用Unused
--- &#29; --- 未使用Unused
--- &#30; --- 未使用Unused
--- &#31; --- 未使用Unused
  &#32; --- Space
! &#33; --- 惊叹号Exclamation mark
" &#34; &quot; 双引号Quotation mark
# &#35; --- 数字标志Number sign
$ &#36; --- 美元标志Dollar sign
% &#37; --- 百分号Percent sign
& &#38; &amp; Ampersand
' &#39; --- 单引号Apostrophe
( &#40; --- 小括号左边部分Left parenthesis
) &#41; --- 小括号右边部分Right parenthesis
* &#42; --- 星号Asterisk
+ &#43; --- 加号Plus sign
, &#44; --- 逗号Comma
- &#45; --- 连字号Hyphen
. &#46; --- 句号Period (fullstop)
/ &#47; --- 斜杠Solidus (slash)
0 &#48; --- 数字0 Digit 0
1 &#49; --- 数字1 Digit 1
2 &#50; --- 数字2 Digit 2
3 &#51; --- 数字3 Digit 3
4 &#52; --- 数字4 Digit 4
5 &#53; --- 数字5 Digit 5
6 &#54; --- 数字6 Digit 6
7 &#55; --- 数字7 Digit 7
8 &#56; --- 数字8 Digit 8
9 &#57; --- 数字9 Digit 9
: &#58; --- 冒号Colon
; &#59; --- 分号Semicolon
< &#60; &lt; 小于号Less than
= &#61; --- 等于符号Equals sign
> &#62; &gt; 大于号Greater than
? &#63; --- 问号Question mark
@ &#64; --- Commercial at
A &#65; --- 大写A Capital A
B &#66; --- 大写B Capital B
C &#67; --- 大写C Capital C
D &#68; --- 大写D Capital D
E &#69; --- 大写E Capital E
F &#70; --- 大写F Capital F
G &#71; --- 大写G Capital G
H &#72; --- 大写H Capital H
I &#73; --- 大写J Capital I
J &#74; --- 大写K Capital J
K &#75; --- 大写L Capital K
L &#76; --- 大写K Capital L
M &#77; --- 大写M Capital M
N &#78; --- 大写N Capital N
O &#79; --- 大写O Capital O
P &#80; --- 大写P Capital P
Q &#81; --- 大写Q Capital Q
R &#82; --- 大写R Capital R
S &#83; --- 大写S Capital S
T &#84; --- 大写T Capital T
U &#85; --- 大写U Capital U
V &#86; --- 大写V Capital V
W &#87; --- 大写W Capital W
X &#88; --- 大写X Capital X
Y &#89; --- 大写Y Capital Y
Z &#90; --- 大写Z Capital Z
[ &#91; --- 中括号左边部分Left square bracket
\ &#92; --- 反斜杠Reverse solidus (backslash)
] &#93; --- 中括号右边部分Right square bracket
^ &#94; --- Caret
_ &#95; --- 下划线Horizontal bar (underscore)
` &#96; --- 尖重音符Acute accent
a &#97; --- 小写a Small a
b &#98; --- 小写b Small b
c &#99; --- 小写c Small c
d &#100; --- 小写d Small d
e &#101; --- 小写e Small e
f &#102; --- 小写f Small f
g &#103; --- 小写g Small g
h &#104; --- 小写h Small h
i &#105; --- 小写i Small i
j &#106; --- 小写j Small j
k &#107; --- 小写k Small k
l &#108; --- 小写l Small l
m &#109; --- 小写m Small m
n &#110; --- 小写n Small n
o &#111; --- 小写o Small o
p &#112; --- 小写p Small p
q &#113; --- 小写q Small q
r &#114; --- 小写r Small r
s &#115; --- 小写s Small s
t &#116; --- 小写t Small t
u &#117; --- 小写u Small u
v &#118; --- 小写v Small v
w &#119; --- 小写w Small w
x &#120; --- 小写x Small x
y &#121; --- 小写y Small y
z &#122; --- 小写z Small z
{ &#123; --- 大括号左边部分Left curly brace
| &#124; --- 竖线Vertical bar
} &#125; --- 大括号右边部分Right curly brace
~ &#126; --- Tilde
--- &#127; --- 未使用Unused
  &#160; &nbsp; 空格Nonbreaking space
¡ &#161; &iexcl; Inverted exclamation
¢ &#162; &cent; 货币分标志Cent sign
£ &#163; &pound; 英镑标志Pound sterling
¤ &#164; &curren; 通用货币标志General currency sign
¥ &#165; &yen; 日元标志Yen sign
¦ &#166; &brvbar; or &brkbar; 断竖线Broken vertical bar
§ &#167; &sect; 分节号Section sign
¨ &#168; &uml; or &die; 变音符号Umlaut
© &#169; &copy; 版权标志Copyright
ª &#170; &ordf; Feminine ordinal
« &#171; &laquo; Left angle quote, guillemet left
¬ &#172; &not Not sign
­ &#173; &shy; Soft hyphen
® &#174; &reg; 注册商标标志Registered trademark
¯ &#175; &macr; or &hibar; 长音符号Macron accent
° &#176; &deg; 度数标志Degree sign
± &#177; &plusmn; 加或减Plus or minus
² &#178; &sup2; 上标2 Superscript two
³ &#179; &sup3; 上标3 Superscript three
´ &#180; &acute; 尖重音符Acute accent
µ &#181; &micro; Micro sign
&#182; &para; Paragraph sign
· &#183; &middot; Middle dot
¸ &#184; &cedil; Cedilla
¹ &#185; &sup1; 上标1 Superscript one
º &#186; &ordm; Masculine ordinal
» &#187; &raquo; Right angle quote, guillemet right
¼ &#188; &frac14; 四分之一Fraction one-fourth
½ &#189; &frac12; 二分之一Fraction one-half
¾ &#190; &frac34; 四分之三Fraction three-fourths
¿ &#191; &iquest; Inverted question mark
À &#192; &Agrave; Capital A, grave accent
Á &#193; &Aacute; Capital A, acute accent
 &#194; &Acirc; Capital A, circumflex
à &#195; &Atilde; Capital A, tilde
Ä &#196; &Auml; Capital A, di?esis / umlaut
Å &#197; &Aring; Capital A, ring
Æ &#198; &AElig; Capital AE ligature
Ç &#199; &Ccedil; Capital C, cedilla
È &#200; &Egrave; Capital E, grave accent
É &#201; &Eacute; Capital E, acute accent
Ê &#202; &Ecirc; Capital E, circumflex
Ë &#203; &Euml; Capital E, di?esis / umlaut
Ì &#204; &Igrave; Capital I, grave accent
Í &#205; &Iacute; Capital I, acute accent
Î &#206; &Icirc; Capital I, circumflex
Ï &#207; &Iuml; Capital I, di?esis / umlaut
Ð &#208; &ETH; Capital Eth, Icelandic
Ñ &#209; &Ntilde; Capital N, tilde
Ò &#210; &Ograve; Capital O, grave accent
Ó &#211; &Oacute; Capital O, acute accent
Ô &#212; &Ocirc; Capital O, circumflex
Õ &#213; &Otilde; Capital O, tilde
Ö &#214; &Ouml; Capital O, di?esis / umlaut
× &#215; &times; 乘号Multiply sign
Ø &#216; &Oslash; Capital O, slash
Ù &#217; &Ugrave; Capital U, grave accent
Ú &#218; &Uacute; Capital U, acute accent
Û &#219; &Ucirc; Capital U, circumflex
Ü &#220; &Uuml; Capital U, di?esis / umlaut
Ý &#221; &Yacute; Capital Y, acute accent
Þ &#222; &THORN; Capital Thorn, Icelandic
ß &#223; &szlig; Small sharp s, German sz
à &#224; &agrave; Small a, grave accent
á &#225; &aacute; Small a, acute accent
â &#226; &acirc; Small a, circumflex
ã &#227; &atilde; Small a, tilde
ä &#228; &auml; Small a, di?esis / umlaut
å &#229; &aring; Small a, ring
æ &#230; &aelig; Small ae ligature
ç &#231; &ccedil; Small c, cedilla
è &#232; &egrave; Small e, grave accent
é &#233; &eacute; Small e, acute accent
ê &#234; &ecirc; Small e, circumflex
ë &#235; &euml; Small e, di?esis / umlaut
ì &#236; &igrave; Small i, grave accent
í &#237; &iacute; Small i, acute accent
î &#238; &icirc; Small i, circumflex
ï &#239; &iuml; Small i, di?esis / umlaut
ð &#240; &eth; Small eth, Icelandic
ñ &#241; &ntilde; Small n, tilde
ò &#242; &ograve; Small o, grave accent
ó &#243; &oacute; Small o, acute accent
ô &#244; &ocirc; Small o, circumflex
õ &#245; &otilde; Small o, tilde
ö &#246; &ouml; Small o, di?esis / umlaut
÷ &#247; &divide; 除号Division sign
ø &#248; &oslash; Small o, slash
ù &#249; &ugrave; Small u, grave accent
ú &#250; &uacute; Small u, acute accent
û &#251; &ucirc; Small u, circumflex
ü &#252; &uuml; Small u, di?esis / umlaut
ý &#253; &yacute; Small y, acute accent
þ &#254; &thorn; Small thorn, Icelandic
ÿ &#255; &yuml; Small y, umlaut

 

文章出处:www.seocnz.com
SEO中国站专注企业SEO服务SEO优化,网站优化,中国SEO诚信服务品牌。
本文seocnz保留所有,转载请以连接形式注明出处。

------分隔线----------------------------

------分隔线----------------------------
发表评论
请自觉遵守互联网相关政策法规,作者管理后台可以删除恶意评论、广告和违禁词语。。
验证码:点击我更换图片
SEO中国站优化服务官方微薄
推荐内容
  • CSS长度单位参考

    在CSS样式表中,我们经常会看到pt, px,em,ex,in等这类长度单位。它们各是什么意思...

  • CSS属性参考

    SEO 中国站所知,该CSS属性参考是根据W3C的CSS2标准的属性参考说明和微软的CSS属性参...

  • CSS伪类(pseudo-class)

    和一般的CSS语法不同(参见 SEO中国站 CSS语法),CSS伪类的语法有两种。 第一种: sele...

  • CSS列表属性(list-style)

    列表样式类型属性(list-style-type) 这个属性用来设定列表项标记(list-item marker)的...

  • CSS盒子模式(Box Model)

    SEO 中国站详细介绍下,什么是盒子模式,在CSS 中有个重要的概念,就是盒子模式 (Box ...

  • CSS间隙属性(padding)

    间隙属性(padding)是用来设置元素内容到元素边界的距离。 左间隙属性(padding-left) ...

SEO服务