gududesiling 发表于 2011-12-22 08:54

对meta http-equiv=Content-Type 的理解

<DIV>&lt;html xmlns="<A href="http://www.w3.org/1999/xhtml" target=_blank><FONT color=#133db6>http://www.w3.org/1999/xhtml</FONT></A>"&gt;<BR><head>&nbsp;<BR>&nbsp; <meta http-equiv=Content-Type content=text/html; charset=gb2312>&nbsp;<BR><head> </DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>每次看被人的代码的时候都会看到这行代码,现在网上搜了搜,解释如下:</DIV>
<DIV><FONT size=2><FONT color=#c60a00>META标签</FONT>用来描述一个HTML网页文档的属性,例如作者、日期和时间、网页描述、关键词、页面刷新;</FONT><FONT size=3>它位于HTML文档的&lt;head&gt;和&lt;title&gt;之间,它提供的信息虽然用户不可见,但却是文档的最基本的元信息</FONT></DIV>
<DIV><FONT size=3></FONT>&nbsp;</DIV>
<DIV><FONT size=3>上面这段mate标签的含义是:其作用是指定了当前文档所使用的字符编码为gb2312(也就是</FONT><A href="http://baike.baidu.com/view/1291786.htm" target=_blank><FONT color=#136ec2 size=3>中文简体</FONT></A><FONT size=3>字符),根据这一行代码,</FONT><A href="http://baike.baidu.com/view/7718.htm" target=_blank><FONT color=#136ec2 size=3>浏览器</FONT></A><FONT size=3>就可以识别出这个网页应该用中文简体字符显示。类似地,如果 将 “gb2312”替换为“big5”,就是我们熟知的中文繁体字符了。&nbsp; 外国网站一般是ISO-8859-1<BR></FONT></DIV>
<DIV><FONT size=3></FONT>&nbsp;</DIV>
<DIV>content="text/html" 说明是html文件</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;html xmlns="<A href="http://www.w3.org/1999/xhtml" target=_blank><FONT color=#133db6>http://www.w3.org/1999/xhtml</FONT></A>"&gt;</DIV>
<DIV>这个是W3C的格式标准说明地址</DIV>
<DIV>W3C是World Wide Web Consortium(万维网联盟)的缩写,像HTML、XHTML、CSS、XML的标准就是由W3C来定制</DIV>
页: [1]
查看完整版本: 对meta http-equiv=Content-Type 的理解