网站首页 > 基础教程 正文
一、语法:
<meta name="name" content="string">
二、参数解析:
1)name选项:Keywords(关键字),description(网站内容描述),author(作者),robots(机器人向导)等等
2)http-equiv项:可用于代替name项,常用的选项有Expires(期限),Pragma(cache模式),Refresh(刷新),Set-Cookie(cookie设定),Window-target(显示窗口的设定),content-Type(显示字符集的设定)等。
3)content项:根据name项或http-equiv项的定义来决定此项填写什么样的字符串。
1.添加对手机设备的支持
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">(禁止缩放)
2.兼容IE
<meta http-equiv="X-UA-Compatible" content="IE=edge">
3.规定utf-8编码
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4.让搜索引擎搜索到关键字
<meta name="Keywords" content="网页关键字"> <meta name="description" content="网页描述文字" />
5.设置双核浏览器的浏览模式
<meta name="renderer" content="webkit"> <meta name=“renderer” content=“webkit|ie-comp|ie-stand”>(分别为极速模式,兼容模式,以及IE模式)
6.产生特殊效果
< meta http-equiv="Page-Enter" content= "revealTrans(Duration=5.0,Transition=n)" >(n的取值范围为0-23)
7、标注作者:
<meta name="author" content="二度空间">
8、控制页面缓冲,如不要页面缓冲的代码这样写:
<meta http-equiv="Cache-Control" CONTENT="no-cache">
9.让网页每隔一段时间刷新一次,若要10秒刷新一次,代码这样写:
<meta http-equiv="refresh" content="10">
10.让一个页面过上一定的时间,自动转到另一个页面或者站点去,如:
< meta HTTP-EQUIV="refresh" content="6; url=http://hi.baidu.com/tesalo/" >
11.content中的6表示时间,单位为秒,url=后面是你要转向的网址,若是与你当前网页在同一目录下,可以直接写上文件名,如:
< meta HTTP-EQUIV="refresh" content="6; url=page1.htm" >
- 上一篇: 给web页面添加甘特图,只需三条命令!
- 下一篇: 网站复制粘贴收费怎么办
猜你喜欢
- 2024-11-25 网站复制粘贴收费怎么办
- 2024-11-25 给web页面添加甘特图,只需三条命令!
- 2024-11-25 初识meta标签与SEO——零基础自学网页制作
- 2024-11-25 彻底禁止查看网页源代码及破解
- 2024-11-25 国产化操作系统浏览器自定义协议
- 2024-11-25 Electron 进程间通信的四种方式
- 2024-11-25 PHP页面跳转
- 2024-11-25 如何实现公司各个系统之间的账号互通和SSO统一登陆
- 2024-11-25 10分钟学会用Python抓取电影排行榜
- 2024-11-25 面向前端工程师的设计模式-原型模式
- 06-09Socioeconomic growth goals high on meetings' agenda
- 06-09Cities Along Middle Reaches of Yangtze River Agree on 63 Cooperation Items
- 06-09Scientists to make flag flutter on moon
- 06-09CBN丨Foreign-funded institutions bullish on Chinese assets
- 06-09Full Text: Joint Statement between the People's Republic of China and the French Republic on Climate Change on the occasion of the Tenth Anniversary of the Paris Agreement
- 06-092022年底总结,温暖和激励自己的文案
- 06-09百度实时推送代码解决方案(百度实时推送工具)
- 06-09PHP漏洞之跨网站请求伪造(php跨站脚本攻击)
- 最近发表
-
- Socioeconomic growth goals high on meetings' agenda
- Cities Along Middle Reaches of Yangtze River Agree on 63 Cooperation Items
- Scientists to make flag flutter on moon
- CBN丨Foreign-funded institutions bullish on Chinese assets
- Full Text: Joint Statement between the People's Republic of China and the French Republic on Climate Change on the occasion of the Tenth Anniversary of the Paris Agreement
- 2022年底总结,温暖和激励自己的文案
- 百度实时推送代码解决方案(百度实时推送工具)
- PHP漏洞之跨网站请求伪造(php跨站脚本攻击)
- ThinkPHP后台入口地址查找(thinkphp build.php)
- PHP新手如何提高代码质量(php新手如何提高代码质量的方法)
- 标签列表
-
- jsp (69)
- gitpush (78)
- gitreset (66)
- python字典 (67)
- dockercp (63)
- gitclone命令 (63)
- dockersave (62)
- linux命令大全 (65)
- pythonif (86)
- location.href (69)
- dockerexec (65)
- tail-f (79)
- queryselectorall (63)
- location.search (79)
- bootstrap教程 (74)
- deletesql (62)
- linuxgzip (68)
- 字符串连接 (73)
- html标签 (69)
- c++初始化列表 (64)
- mysqlinnodbmyisam区别 (63)
- arraylistadd (66)
- mysqldatesub函数 (63)
- window10java环境变量设置 (66)
- c++虚函数和纯虚函数的区别 (66)