Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537 Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537
1. <meta name="keywords" content="關(guān)鍵字">
content里面寫網(wǎng)頁的關(guān)鍵字,可以寫多個(gè),用逗號隔開。
2. <meta name="description" content="網(wǎng)站的介紹">
content里面寫關(guān)于網(wǎng)站的介紹描述
3. <meta name="robots" content="all">
這個(gè)是用來定義搜索爬蟲的方式,這里的content的屬性有:all,none,index,noindex,follow,nofollow,默認(rèn)是‘a(chǎn)ll’,
all:文件將被檢索,且頁面上的鏈接可以被查詢;none:跟all相反;index:文件將被檢索;noindex:文件將不被檢索,但是頁面上的鏈接可以被找到;follow:網(wǎng)頁上的鏈接可以被找到;nofollow:網(wǎng)頁可以搜索到,但是網(wǎng)頁上的鏈接不可以被找到
4. <meta name="author" content="作者">
content里面可以寫網(wǎng)站作者的相關(guān)資料如名字,郵箱,QQ什么的
5. <meta name="copyright" content="版權(quán)信息">
這里寫版權(quán)信息相關(guān)的東西
6. <meta charset="UTF-8" />
網(wǎng)頁的編碼格式:
UTF-8:世界通用的編碼格式
GB2312:簡體中文
其他的網(wǎng)上可以找到
7. <meta http-equiv="Refresh" content="3;url=http://www.mackxin.com">
網(wǎng)頁在3秒后自動(dòng)跳轉(zhuǎn)到www.mackxin.com這個(gè)網(wǎng)站上,如果不寫右邊的網(wǎng)址,表示3秒后刷新當(dāng)前網(wǎng)頁
如果你也有好的想法,可以關(guān)注我的微信公眾號:馨客棧 ,也可以加入我的新的QQ群:65202496來一起交流學(xué)習(xí)好玩有趣的想法。進(jìn)群可以也拉到微信群一起交流各種有趣好玩的分享
eta常用于定義頁面的說明,關(guān)鍵字,最后修改日期,和其它的元數(shù)據(jù)。這些元數(shù)據(jù)將服務(wù)于瀏覽器(如何布局或重載頁面),搜索引擎和其它網(wǎng)絡(luò)服務(wù)。
meta標(biāo)簽分兩大部分:HTTP標(biāo)題信息(http-equiv)和頁面描述信息(name)。
http-equiv一般設(shè)置的都是與http請求頭相關(guān)的信息,設(shè)置的值會關(guān)聯(lián)到http頭部。也就是說瀏覽器在請求服務(wù)器獲取html的時(shí)候,服務(wù)器會將html中設(shè)置的meta放在響應(yīng)頭中返回給瀏覽器。常見的類型比如content-type, expires, refresh, set-cookie, window-target, charset, pragma等等。
比如:<meta http-equiv="content-type" content="text/html charset=utf8">可以用來聲明文檔類型,設(shè)置字符集,content-type幾乎所有的屬性都可以在meta中進(jìn)行設(shè)置。
這樣設(shè)置瀏覽器的頭信息就會包含:
content-type: text/html charset=utf8
用于設(shè)置瀏覽器的過期時(shí)間, 其實(shí)就是響應(yīng)頭中的expires屬性。
<meta http-equiv="expires" content="31 Dec 2021">
expires:31 Dec 2008
該種設(shè)定表示5秒自動(dòng)刷新并且跳轉(zhuǎn)到指定的網(wǎng)頁。如果不設(shè)置url的值那么瀏覽器則刷新本網(wǎng)頁。
<meta http-equiv="refresh" content="5 url=http://www.zhiqianduan.com">
強(qiáng)制頁面在當(dāng)前窗口以獨(dú)立頁面顯示, 可以防止別人在框架中調(diào)用自己的頁面。
<meta http-equiv="window-target" content="_top'>
禁止瀏覽器從本地計(jì)算機(jī)的緩存中訪問頁面的內(nèi)容
<meta http-equiv="pragma" content="no-cache">
name屬性主要用于描述網(wǎng)頁,與對應(yīng)的content中的內(nèi)容主要是便于搜索引擎查找信息和分類信息用的, 用法與http-equiv相同,name設(shè)置屬性名,content設(shè)置屬性值。
author用來標(biāo)注網(wǎng)頁的作者
<meta name="author" content="aaa@mail.abc.com">
description用來告訴搜素引擎當(dāng)前網(wǎng)頁的主要內(nèi)容,是關(guān)于網(wǎng)站的一段描述信息。
<meta name="description" content="這是我的HTML">
keywords設(shè)置網(wǎng)頁的關(guān)鍵字,來告訴瀏覽器關(guān)鍵字是什么。是一個(gè)經(jīng)常被用到的名稱。它為文檔定義了一組關(guān)鍵字。某些搜索引擎在遇到這些關(guān)鍵字時(shí),會用這些關(guān)鍵字對文檔進(jìn)行分類。
<meta name="keywords" content="Hello world">
表示當(dāng)前html是用什么工具編寫生成的,并沒有實(shí)際作用,一般是編輯器自動(dòng)創(chuàng)建的。
<meta name="generator" content="vscode">
指定頁面的最新版本
<meta name="revised" content="V2,2015/10/1">
告訴搜索引擎機(jī)器人抓取哪些頁面,all / none / index / noindex / follow / nofollow。
<meta name="robots" content="all">
all:文件將被檢索,且頁面上的鏈接可以被查詢;none:文件將不被檢索,且頁面上的鏈接不可以被查詢;index:文件將被檢索;follow:頁面上的鏈接可以被查詢;noindex:文件將不被檢索,但頁面上的鏈接可以被查詢;nofollow:文件將不被檢索,頁面上的鏈接可以被查詢。
eta標(biāo)簽
meta標(biāo)簽的name屬性語法格式是:
<meta name="參數(shù)"content="具體的參數(shù)值">。
name屬性參數(shù):
keywords用來告訴搜索引擎你網(wǎng)頁的關(guān)鍵字是什么。
舉例:<meta name="keywords"content="meta總結(jié),html meta,meta屬性,meta跳轉(zhuǎn)">
description用來告訴搜索引擎你的網(wǎng)站主要內(nèi)容。
舉例:<meta name="description"content="haorooms博客,html的meta總結(jié),meta是html語言head區(qū)的一個(gè)輔助性標(biāo)簽。">
robots用來告訴搜索機(jī)器人哪些頁面需要索引,哪些頁面不需要索引。
content的參數(shù)有all,none,index,noindex,follow,nofollow。默認(rèn)是all。
舉例:<meta name="robots"content="none">
具體參數(shù)如下:
信息參數(shù)為all:文件將被檢索,且頁面上的鏈接可以被查詢;
信息參數(shù)為none:文件將不被檢索,且頁面上的鏈接不可以被查詢;
信息參數(shù)為index:文件將被檢索;
信息參數(shù)為follow:頁面上的鏈接可以被查詢;
信息參數(shù)為noindex:文件將不被檢索,但頁面上的鏈接可以被查詢;
信息參數(shù)為nofollow:文件將被檢索,但頁面上的鏈接不可以被查詢;
author標(biāo)注網(wǎng)頁作者
舉例:<meta name="author"content="root,root@xxxx.com">
generator
<meta name="generator"content="cms"/>
meta標(biāo)簽的generator的信息參數(shù),代表說明網(wǎng)站的采用的什么軟件制作。
COPYRIGHT
<META NAME="COPYRIGHT"CONTENT="信息參數(shù)">
meta標(biāo)簽的COPYRIGHT的信息參數(shù),代表說明網(wǎng)站版權(quán)信息。
revisit-after
<META name="revisit-after"CONTENT="7days">
revisit-after代表網(wǎng)站重訪,7days代表7天,依此類推。
移動(dòng)設(shè)備
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
<!-- `width=device-width` 會導(dǎo)致 iPhone 5 添加到主屏后以 WebApp 全屏模式打開頁面時(shí)出現(xiàn)黑邊 -->
WebApp全屏模式
<meta name="apple-mobile-web-app-capable" content="yes" /> <!-- 啟用 WebApp 全屏模式 -->
隱藏狀態(tài)欄/設(shè)置狀態(tài)欄顏色
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
添加到主屏后的標(biāo)題
<meta name="apple-mobile-web-app-title" content="標(biāo)題">
忽略數(shù)字自動(dòng)識別為電話號碼
<meta content="telephone=no" name="format-detection" />
忽略識別郵箱
<meta content="email=no" name="format-detection" />
瀏覽器不會自動(dòng)調(diào)整文件的大小,也就是說是固定大小,不會隨著瀏覽器拉伸縮放。
<meta name="MobileOptimized" content="240"/>
謝謝關(guān)注!
*請認(rèn)真填寫需求信息,我們會在24小時(shí)內(nèi)與您取得聯(lián)系。