HTML - 颜色名称

下表显示了HTML 3.2 : 中引入的16种颜色名称;

颜色名称 十六进制值 颜色 显示
aqua # 00ffff
演示
黑色 #000000
演示
blue #0000ff
演示
fuchsia #ff00ff
演示
绿色 #008000
演示
灰色 #808080
演示
lime #00ff00
演示
maroon #800000
演示
navy #000080
演示
olive # 808000
演示
purple #800080
演示
red #ff0000
演示
silver #c0c0c0
演示
teal #008080
演示
white #ffffff
演示
黄色 #fff00
演示

还有其他颜色可供选择不是HTML或XHTML的一部分,但主要浏览器的大多数版本都支持它们.

颜色名称 十六进制值 颜色 显示
aliceblue #f0f8ff
演示
antiquewhite #faebd7
演示
海蓝宝石 #7fffd4
演示
azure #f0ffff
演示
米色 #f5f5dc
演示
bisque #ffe4c4
演示
blanchedalmond #ffebcd
演示
blueviolet #8a2be2
演示
brown #a52a2a
演示
burlywood #deb887
演示
cadetblue #5f9ea0
演示
黄绿色 #7fff00
演示
chocolate #d2691e
演示
coral #ff7f50
演示
cornflowerblue #6495ed
演示
cornsilk #fff8dc
演示
crimson #dc143c
演示
青色 #00ffff
演示
darkblue #00008b
演示
darkcyan #008b8b
演示
darkgoldenrod #b8860b
演示
darkgray # a9a9a9
演示
darkgreen #006400
演示
darkkhaki #bdb76b
演示
darkmagenta #8b008b
演示
darkolivegreen #556b2f
演示
darkorange #ff8c00
演示
darkorchid #9932cc
演示
darkred #8b0000
演示
darksalmon #e9967a
演示
darkseagreen #8fbc8f
演示
darkslateblue #483d8b
演示
darkslategray #2f4f4f
演示
darkturquoise #00ced 1
演示
darkviolet #9400d3
演示
deeppink #ff1493
演示
deepskyblue #00bfff
演示
dimgray #696969
演示
dodgerblue #1e90ff
演示
耐火砖 #b22222
演示
floralwhite #ffiff0
演示
forestgreen #228b22
演示
gainsboro #dcdcdc
演示
ghostwhite #f8f8ff
演示
gold #ffd700
演示
goldenrod #daa520
演示
灰色 #808080
演示
greenyellow #adff2f
演示
honeydew #f0fff0
演示
hotpink #ff69b4
indianred #cd5c5c
演示
indigo #4b0082
演示
象牙白 #ffiff0
演示
khaki #f0e68c
演示
lavender #e6e6fa
演示
lavenderblush #fff0f5
演示
lawngreen #7cfc00
演示
lemonchiffon #fffacd
演示
lightblue #add8e6
演示
lightcoral #f08080
演示
lightcyan #e0ffff
演示
lightgoldenrodyellow #fafad2
演示
lightgreen #90ee90
演示
lightgrey #d3d3d3
演示
lightpink #ffb6c1
演示
lightsalmon #ffa07a
演示
lightseagreen #20b2aa
演示
lightskyblue #87cefa
演示
lightslategray #778899
演示
lightsteelblue #b0c4de
演示
lightyellow #ffiff0
演示
limegreen #32cd32
演示
亚麻 #faf0e6
演示
magenta #ff00ff
演示
mediumblue #0000cd
演示
mediumorchid #ba5 5d3
演示
mediumpurple #9370db
演示
midnightblue #191970
演示
mistyrose #ffe4e1
演示
moccasin #ffe4b5
演示
oldlace #fdf5e6
演示
orange #ffa500
演示
orchid #da70d6
演示
peachpuff #ffdab9
演示
秘鲁 #cd853f
演示
粉红色 #ffc0cb
演示
plum #dda0dd
演示
purple #800080
演示
rosybrown #bc8f8f
演示
royalblue #4169e1
演示
salmon #fa8072
演示
sandybrown #f4a460
演示
seagreen #2e8b57
演示
sienna #a0522d
演示
skyblue #87ceeb
演示
slateblue #6a5acd
演示
steelblue #4682b4
演示
tan #d2b48c
演示
thistle #d8bfd8
演示
番茄 #ff6347
紫色 #ee82ee
演示
小麦 #f5deb3
演示
whitesmoke #f5f5f5
演示
黄色 #fff00
演示
yellowgreen #9acd32
演示

HTML实体

某些字符在HTML中保留,它们具有特殊含义用于HTML文档.例如,您不能在HTML文本中使用大于或小于标记或尖括号,因为浏览器会以不同方式对待它们,并尝试绘制与HTML标记相关的含义.

HTML处理器必须支持下表中列出的五个特殊字符.

符号 描述 实体名称 数字代码
" 引号 & quot; "
' 撇号  & '
& &符号 & amp; &
< 小于 & lt; & #60;
> 大于 & ; gt; &#62;

示例

如果你想写< div id ="character">作为代码,那么你必须写如下 :

<!DOCTYPE html>
<html>

   <head>
      <title>HTML Entities</title>
   </head>

   <body>
      &lt;div id = &quot;character&quot;&gt;
   </body>

</html>

这将产生以下结果 :

HTML 4.0中还有一长串特殊字符.为了使这些文档出现在您的文档中,您可以使用数字代码或实体名称.例如,要插入版权符号,您可以使用以下任一和减号;

&copy; 2007
or
&#169; 2007

ISO 8859-1符号实体

结果 描述 实体名称 数字代码
  不间断空格 & nbsp; &#160;
&iexcl; 倒置感叹号 & iexcl; &#161;
¤ 货币 & curren; &#164;
¢ cent & cent; &#162;
£ & pound; &#163;
¥ yen & yen; & #165;
&brvbar; 损坏的竖线 & brvbar; &#166;
§ section & ; sect; &#167;
¨ spacer diaeresis & uml; &#168;
&copy; copyright & copy; &#169;
ª 女性化序数指标 & ordf; &#170;
&laquo; 角度引号(左) & laquo; &#171;
¬ 否定 & not; &#172;

soft hyphen & shy; &#173;
® 注册商标方舟 & reg; &#174;
&trade; 商标 & trade; & #8482;
¯ spacer macron & macr; &#175;
° & deg; &#176;
± plus-or-minus  & ; plusmn; &#177;
² 上标2 & sup2; &#178;
³ 上标3 & sup3; &#179;
' 间距急性 & acute; &#180;
μ micro & micro; &# 181;
段落 & para; & ;#182;
· 中间点 & middot; &#183;
¸ 间距cedilla & cedil; &#184;
¹ 上标1 & sup1 ; &#185;
º 男性序数指标 & ordm; &#186;
&raquo; 角度引号(右) & raquo; &#187;
¼ 分数1/4 & frac14; &#188;
½ 分数1/2 & frac12; &#189;
¾ fracti on 3/4 & frac34; &#190;
¿ 倒置问号 & iquest; &#191;
× 乘法 & times; &#215;
÷ division & divide; &#247;

ISO 8859-1字符实体

结果 描述 实体名称 数字代码
&Agrave; 资本a,严重重音 & Agrave; &#192;
&Aacute; capital a,acute accent &Aacute; &#193;
&Acirc; capital a,circumflex accent &Acirc; &#194;
&Atilde; capital a,tilde &Atilde; &#195;
&Auml; capital a,umlaut mark &Auml; &#196;
&Aring; capital a,ring &Aring; &#197;
&AElig; capital ae &AElig; &#198;
&Ccedil; capital c,cedilla &Ccedil; &#199;
&Egrave; capital e,grave accent &Egrave; &#200;
&Eacute; capital e,acute accent &Eacute; &am p;#201;
&Ecirc; capital e,circumflex accent &Ecirc; &#202;
&Euml; capital e,umlaut mark &Euml; &#203;
&Igrave; capital i,grave accent &Igrave; &#204;
&Iacute; capital i,acute accent &Iacute; &#205;
&Icirc; capital i,circumflex accent &Icirc; &#206;
&Iuml; capital i,umlaut mark &Iuml; &#207;
&ETH; capital eth,Icelandic &ETH; &#208;
&Ntilde; capital n,tilde &Ntilde; &#209;
&Ograve; capital o,grave accent &Ograve; &#210;
&Oacute; capital o,acute accent &Oacute; &#211;
&Ocirc; capital o,circumflex accent &Ocirc; &#212;
&Otilde; capital o,tilde &Otilde; &#213;
&Ouml; capital o,umlaut mark &Ouml; &#214;
&Oslash; capital o,slash &Oslash; &#216;
Ù capital u,grave accent &Ugrave; &#217;
Ú capital u,acute accent &Uacute; &#218;
Û capital u,circumflex accent &Ucirc; &#219;
Ü capital u,umlaut mark &Uuml; &#220;
Ý capital y,acute accent &Yacute; &#221;
Þ capital THORN,Icelandic &THORN; &#222;
ß small sharp s,German &szlig; &#223;
à small a,grave accent &agrave; &#224;
á small a,acute accent &aacute; &#225;
â small a,circumflex accent &acirc; &#226;
ã small a,tilde &atilde; &#227;
ä small a,umlaut mark &auml; &#228;
å small a,ring &aring; &#229;
æ small ae &aelig; &#230;
ç small c,cedilla &ccedil; &#231;
è small e,grave accent &egrave; &#232;
é small e,acute accent &eacute; &#233;
ê small e,circumflex accent &ecirc; &#234;
ë small e,umlaut mark &euml; &#235;
ì small i,grave accent &igrave; &#236;
í small i,acute accent &iacute; &#237;
î small i,circumflex accent &icirc; &#238;
ï small i,umlaut mark &iuml; &#239;
ð small eth,Icelandic &eth; &#240;
ñ small n,tilde &ntilde; &#241;
ò small o,grave accent &ograve; &#242;
ó small o,acute accent &oacute; &#243;
ô small o,circumflex accent &ocirc; &#244;
õ small o,tilde &otilde; &#245;
ö small o,umlaut mark &ouml; &#246;
ø small o,slash &oslash; &#248;
ù small u,grave accent &ugrave; &#249;
ú small u,acute accent &uacute; &#250;

small u,circumflex accent &ucirc; &#251;
ü small u,umlaut mark &uuml; &#252;
ý small y,acute accent &yacute; &#253;
þ small thorn,Icelandic &thorn; &#254;
ÿ small y,umlaut mark &yuml; &#255;

Other Entities Supported by HTML Browsers

$b$ b$b $b

Result Description Entity Name Number Code
Πcapital ligature OE &OElig; &#338;
œ small ligature oe &oelig; &#339;
Š capital S with caron &Scaron; &#352;
š small S with caron &scaron; &#353;
Ÿ capital Y with diaeres &Yuml; &#376;
ˆ modifier letter circumflex accent &circ; &#710;
˜ small tilde &tilde; &#732;
en space &ensp; &#8194;
em space &emsp; &#8195;
thin space &thinsp; &#8201;
zero width non-joiner &zwnj; &#8204;
zero width joiner &zwj; &#8205;
left-to-right mark &lrm; &#8206;
right-to-left mark &rlm; &#8207;
en dash &ndash; &#8211;
em dash &mdash; &#8212;
left single quotation mark &lsquo; &#8216;
right single quotation mark &rsquo; &#8217;
single low-9 quotation mark &sbquo; &#8218;
" left double quotation mark &ldquo; &#8220;
" right double quotation mark &rdquo; &#8221;
double low-9 quotation mark &bdquo; &#8222;
dagger &dagger; &#8224;
double dagger &Dagger; &#8225;
horizontal ellipsis &hellip; &#8230;
per mille  &permil; &#8240;
single left-pointing angle quotation &lsaquo; &#8249;
single right-pointing angle quotation &rsaquo; &#8250;
euro &euro; &#8364;
本文链接:https://www.f2er.com/3188790.html