一、meta 标签
-
name属性主要用于描述网页,对应于content(网页内容)
1、<meta name="Generator" contect="">用以说明生成工具(如Microsoft FrontPage 4.0)等;
2、<meta name="KEYWords" contect="">向搜索引擎说明你的网页的关键词;
3、<meta name="DEscription" contect="">告诉搜索引擎你的站点的主要内容;
4、<meta name="Author" contect="你的姓名">告诉搜索引擎你的站点的制作的作者;
5、<meta name="Robots" contect= "all|none|index|noindex|follow|nofollow"> 其中的属性说明如下:
①设定为all:文件将被检索,且页面上的链接可以被查询;
②设定为none:文件将不被检索,且页面上的链接不可以被查询;
③设定为index:文件将被检索;
④设定为follow:页面上的链接可以被查询;
⑤设定为noindex:文件将不被检索,但页面上的链接可以被查询;
⑥设定为nofollow:文件将不被检索,页面上的链接可以被查询。
<!--关键字,主要用于SEO--> <meta name="keywords" content="关键词,关键词,关键词,关键词,关键词,关键词,关键词,关键词,"> <!--网页描述,主要用于搜索结果页面对网页的一个描述--> <meta name="description" content="我是关于网页的简单介绍和描述"> <!--网页重定向,用于网页的跳转--> <meta http-equiv="refresh" content="5000;http://www.baidu.com">
-
http-equiv属性:网页重定向
<meta http-equiv="Content-Type" contect="text/html"; charset=gb_2312"> <meta http-equiv="Refresh" content="5;url=http://www.w3school.com.cn" />
-
字符集(charset)属性:utf-8是目前最常用的字符集编码方式,常用的字符集编码方式还有gbk和gb2312 gb2312 简单中文 GBK包含全部中文字符 繁体 BIG5 繁体中文
<meta charset="UTF-8">
二、link标签
1、引用外部css
2、引用title图片 (icon) 例如: <link rel="icon" href="1.icon">
<!-- 链接外部样式文件--> <link rel="stylesheet" href="1.css"> <!--链接iocn图标--> <link rel="icon" href="favicon.ico">