html-文档打印设置
可以为页面指定两个CSS文件,一个用于屏幕显示,一个用于打印:

<link type=”text/css” rel=”stylesheet” href=”stylesheet.css” media=”screen” />

<link type=”text/css” rel=”stylesheet” href=”printstyle.css” media=”print” />

第1行是用于显示的css,第2行是用于打印的css,注意其中的media属性。

html-meta 属性

  1. <meta name=”Generator” contect=””>用以说明生成工具(如Microsoft FrontPage4.0)等;
  2. <meta name=”KEYWords” contect=””>向搜索引擎说明你的网页的关键词;
  3. <meta name=”DEscription” contect=””>告诉搜索引擎你的站点的主要内容;
  4. <meta name=”Robots” contect=”all|none|index|noindex|follow|nofollow”>

    4中属性说明如下:

    • 设定为all:文件将被检索,且页面上的链接可以被查询;
    • 设定为none:文件将不被检索,且页面上的链接不可以被查询;
    • 设定为index:文件将被检索;
    • 设定为follow:页面上的链接可以被查询;
    • 设定为noindex:文件将不被检索,但页面上的链接可以被查询;
    • 设定为nofollow:文件将不被检索,页面上的链接可以被查询。

http-equiv属性

  1. <meta http-equiv=”Content-Type” contect=”text/html;charset=gb_2312-80″>
    和<meta http-equiv=”Content-Language” contect=”zh-CN”>
    用以说明主页制作所使用的文字以及语言;又如英文是ISO-8859-1字符集,还有BIG5、utf-8、shift-Jis、Euc、Koi8-2等字符集;
  2. <meta http-equiv=”Refresh” contect=”n;url=http://yourlink”>
    定时让网页在指定的时间n内,跳转到页面http://yourlink;
  3. <meta http-equiv=”Expires” contect=”Mon,12 May 2001 00:20:00 GMT”>
    可以用于设定网页的到期时间,一旦过期则必须到服务器上重新调用。需要注意的是必须使用GMT时间格式;
  4. <meta http-equiv=”Pragma” contect=”no-cache”>
    是用于设定禁止浏览器从本地机的缓存中调阅页面内容,设定后一旦离开网页就无法从Cache中再调出;
  5. <meta http-equiv=”set-cookie” contect=”Mon,12 May 2001 00:20:00 GMT”>
    cookie设定,如果网页过期,存盘的cookie将被删除。需要注意的也是必须使用GMT时间格式;
  6. <meta http-equiv=”Pics-label” contect=””>
    网页等级评定,在IE的internet选项中有一项内容设置,可以防止浏览一些受限制的网站,而网站的限制级别就是通过meta属性来设置的;
  7. <meta http-equiv=”windows-Target” contect=”_top”>
    强制页面在当前窗口中以独立页面显示,可以防止自己的网页被别人当作一个frame页调用;
  8. <meta http-equiv=”Page-Enter” contect=”revealTrans(duration=10,transtion=50)”>
    和<meta http-equiv=”Page-Exit” contect=”revealTrans(duration=20,transtion=6)”>
    设定进入和离开页面时的特殊效果,这个功能即FrontPage中的“格式/网页过渡”,不过所加的页面不能够是一个frame页面。

 

html-title文字换行

方法一:回车换行

<a href="#"
title="标 题:DIVCSS5
作 者:DIVCSS5
转 贴 自:CSS原创
">title</a>

title换行

方法二:符号代码title换行(“&#10;”或“&#13;”)

<a href="#" title="标 题:DIVCSS5 &#10;作 者:DIVCSS5 &#10;转 贴 自:CSS原创" </a>

title换行

 

html转义字符

字符 十进制 转义字符
>&quot;
& & &amp;
< < &lt;
> > &gt;
空格 &nbsp;

 

特殊符号 命名实体 十进制编码 特殊符号 命名实体 十进制编码
Α &Alpha; &#913; Β &Beta; &#914;
Γ &Gamma; &#915; Δ &Delta; &#916;
Ε &Epsilon; &#917; Ζ &Zeta; &#918;
Η &Eta; &#919; Θ &Theta; &#920;
Ι &Iota; &#921; Κ &Kappa; &#922;
Λ &Lambda; &#923; Μ &Mu; &#924;
Ν &Nu; &#925; Ξ &Xi; &#926;
Ο &Omicron; &#927; Π &Pi; &#928;
Ρ &Rho; &#929; Σ &Sigma; &#931;
Τ &Tau; &#932; Υ &Upsilon; &#933;
Φ &Phi; &#934; Χ &Chi; &#935;
Ψ &Psi; &#936; Ω &Omega; &#937;
α &alpha; &#945; β &beta; &#946;
γ &gamma; &#947; δ &delta; &#948;
ε &epsilon; &#949; ζ &zeta; &#950;
η &eta; &#951; θ &theta; &#952;
ι &iota; &#953; κ &kappa; &#954;
λ &lambda; &#955; μ &mu; &#956;
ν &nu; &#957; ξ &xi; &#958;
ο &omicron; &#959; π &pi; &#960;
ρ &rho; &#961; ς &sigmaf; &#962;
σ &sigma; &#963; τ &tau; &#964;
υ &upsilon; &#965; φ &phi; &#966;
χ &chi; &#967; ψ &psi; &#968;
ω &omega; &#969; ϑ &thetasym; &#977;
ϒ &upsih; &#978; ϖ &piv; &#982;
&bull; &#8226; &hellip; &#8230;
&prime; &#8242; &Prime; &#8243;
&oline; &#8254; &frasl; &#8260;
&weierp; &#8472; &image; &#8465;
&real; &#8476; &trade; &#8482;
&alefsym; &#8501; &larr; &#8592;
&uarr; &#8593; &rarr; &#8594;
&darr; &#8595; &harr; &#8596;
&crarr; &#8629; &lArr; &#8656;
&uArr; &#8657; &rArr; &#8658;
&dArr; &#8659; &hArr; &#8660;
&forall; &#8704; &part; &#8706;
&exist; &#8707; &empty; &#8709;
&nabla; &#8711; &isin; &#8712;
&notin; &#8713; &ni; &#8715;
&prod; &#8719; &sum; &#8722;
&minus; &#8722; &lowast; &#8727;
&radic; &#8730; &prop; &#8733;
&infin; &#8734; &ang; &#8736;
&and; &#8869; &or; &#8870;
&cap; &#8745; &cup; &#8746;
&int; &#8747; &there4; &#8756;
&sim; &#8764; &cong; &#8773;
&asymp; &#8773; &ne; &#8800;
&equiv; &#8801; &le; &#8804;
&ge; &#8805; &sub; &#8834;
&sup; &#8835; &nsub; &#8836;
&sube; &#8838; &supe; &#8839;
&oplus; &#8853; &otimes; &#8855;
&perp; &#8869; &sdot; &#8901;
&lceil; &#8968; &rceil; &#8969;
&lfloor; &#8970; &rfloor; &#8971;
&loz; &#9674; &spades; &#9824;
&clubs; &#9827; &hearts; &#9829;
&diams; &#9830; &nbsp; &#160;
¡ &iexcl; &#161; ¢ &cent; &#162;
£ &pound; &#163; ¤ &curren; &#164;
¥ &yen; &#165; ¦ &brvbar; &#166;
§ &sect; &#167; ¨ &uml; &#168;
© &copy; &#169; ª &ordf; &#170;
« &laquo; &#171; ¬ &not; &#172;
­ &shy; &#173; ® &reg; &#174;
¯ &macr; &#175; ° &deg; d&#176;
± &plusmn; &#177; ² &sup2; &#178;
³ &sup3; &#179; ´ &acute; &#180;
µ &micro; &#181;