html--Meta标签

描述网页文档的属性: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="作者"/>网站作者

posted @ 2017-07-06 10:41  SugarMonster丶  阅读(88)  评论(0编辑  收藏  举报