标签:属性 简体 需要 content 网站 set 模拟 客户端 网页
描述网页文档的属性:http-equiv和name
http-equiv:模拟的是htp文件的头信息,当内容从服务端发送到客户端,告诉浏览器如何正确的显示信息。
1、字符集
<meta http-equiv="content-type" content="text/html;charset=utf-8/"/>多国语言
<meta http-equiv="content-type" content="text/html;charset=gbk/"/>国标码
<meta http-equiv="content-type" content="text/html;charset=gb2312/"/>简体中文
2、网页自动刷新
<meta http-equiv="refresh" content="4"/>间隔4秒钟网页刷新一次
<meta http-equiv="refresh" content="8;http://www.baidu.com"/>等待8秒钟跳转到百度页面
name可以设置网页关键字描述信息等
<meta name="keywords" content="关键字"/>
<meta name="description" content="描述信息"/>
便于搜索引擎需要
<meta name="author" content="作者"/>网站作者
标签:属性 简体 需要 content 网站 set 模拟 客户端 网页
原文地址:http://www.cnblogs.com/xlbgogo/p/7125088.html