html頭部meta標(biāo)簽匯總

meta分類(lèi)
meta標(biāo)簽分兩大部分:HTTP標(biāo)題信息(HTTP-EQUIV)和頁(yè)面描述信息(NAME)。
1、 HTTP-EQUIV
HTTP-EQUIV類(lèi)似于HTTP的頭部協(xié)議,它回應(yīng)給瀏覽器一些有用的信息,以幫助正確和精確地顯示網(wǎng)頁(yè)內(nèi)容。常用的HTTP-EQUIV類(lèi)型有:
(1)Content-Type和Content-Language (顯示字符集的設(shè)定);

    說(shuō)明:用以說(shuō)明主頁(yè)制作所使用的文字以及語(yǔ)言,例如:
    用法:  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta http-equiv="Content-Language" contect="zh-CN">

(2) Refresh (刷新)

    說(shuō)明:讓網(wǎng)頁(yè)多長(zhǎng)時(shí)間(秒)刷新自己,或在多長(zhǎng)時(shí)間后讓網(wǎng)頁(yè)自動(dòng)鏈接到其它網(wǎng)頁(yè)。
    用法:  <meta http-equiv="Refresh" Content="30">
        <meta http-equiv="Refresh" Content="5; Url=http://www.lcsoft.net.cn">
    注意:其中的5是指停留5秒鐘后自動(dòng)刷新到URL網(wǎng)址。

(3) Expires (期限)

    說(shuō)明:指定網(wǎng)頁(yè)在緩存中的過(guò)期時(shí)間,一旦網(wǎng)頁(yè)過(guò)期,必須到服務(wù)器上重新調(diào)閱。
    用法:  <meta http-equiv="Expires" Content="0">
        <meta http-equiv="Expires" Content="Wed, 26 Feb 1997 08:21:57 GMT">
    注意:必須使用GMT的時(shí)間格式,或直接設(shè)為0(數(shù)字表示多少時(shí)間后過(guò)期)。

(4) Pragma (cach模式)

    說(shuō)明:禁止瀏覽器從本地機(jī)的緩存中調(diào)閱頁(yè)面內(nèi)容。
    用法: <meta http-equiv="Pragma" Content="No-cach"> 
    注意:網(wǎng)頁(yè)不保存在緩存中,每次訪問(wèn)都刷新頁(yè)面。這樣設(shè)定,訪問(wèn)者將無(wú)法脫機(jī)瀏覽。

(5) Set-Cookie (cookie設(shè)定)

    說(shuō)明:cookie設(shè)定,如果網(wǎng)頁(yè)過(guò)期,存盤(pán)的cookie將被刪除。
    用法:<meta http-equiv="Set-Cookie" Content="cookievalue=xxx; expires=Wednesday,21-Oct-98 16:14:21 GMT; path=/">
    注意:必須使用GMT的時(shí)間格式。

(6) Window-target (顯示窗口的設(shè)定)

    說(shuō)明:強(qiáng)制頁(yè)面在當(dāng)前窗口以獨(dú)立頁(yè)面顯示。
    用法:<meta http-equiv="Widow-target" Content="_top">
    注意:這個(gè)屬性是用來(lái)防止別人在框架里調(diào)用你的頁(yè)面。Content選項(xiàng):_blank、_top、_self、_parent。

(7) Pics-label (網(wǎng)頁(yè)RSAC等級(jí)評(píng)定)

    說(shuō)明:在IE的Internet選項(xiàng)中有一項(xiàng)內(nèi)容設(shè)置,可以防止瀏覽一些受限制的網(wǎng)站,而網(wǎng)站的限制級(jí)別就是通過(guò)該參數(shù)來(lái)設(shè)置的。
    用法:<mETA http-equiv="Pics-label" Contect=“http://localhost”

(8) Page-Enter、Page-Exit (進(jìn)入與退出)

    說(shuō)明:這個(gè)是頁(yè)面被載入和調(diào)出時(shí)的一些特效。
    用法:<meta http-equiv="Page-Enter" Content="blendTrans(Duration=0.5)">
    <meta http-equiv="Page-Exit" Content="blendTrans(Duration=0.5)">
    注意:blendTrans是動(dòng)態(tài)濾鏡的一種,產(chǎn)生漸隱效果。另一種動(dòng)態(tài)濾鏡RevealTrans也可以用于頁(yè)面進(jìn)入與退出效果。

(9) MSThemeCompatible (XP主題)

    說(shuō)明:是否在IE中關(guān)閉 xp 的主題
    用法:<meta http-equiv="MSThemeCompatible" Content="Yes">
    注意:關(guān)閉 xp 的藍(lán)色立體按鈕系統(tǒng)顯示樣式,從而和win2k 很象。

(10) IE6 (頁(yè)面生成器)

    說(shuō)明:頁(yè)面生成器generator,是ie6
    用法:<meta http-equiv="IE6" Content="Generator">
    注意:用什么東西做的,類(lèi)似商品出廠廠商。

(11) Content-Script-Type (腳本相關(guān))

    說(shuō)明:這是近來(lái)W3C的規(guī)范,指明頁(yè)面中腳本的類(lèi)型。
    用法:<meta http-equiv="Content-Script-Type" Content="text/javascript">

2、 NAME
name是描述網(wǎng)頁(yè)的,對(duì)應(yīng)于Content(網(wǎng)頁(yè)內(nèi)容),以便于搜索引擎機(jī)器人查找、分類(lèi)(目前幾乎所有的搜索引擎都使用網(wǎng)上機(jī)器人自動(dòng)查找meta值來(lái)給網(wǎng)頁(yè)分類(lèi))。
name的content指定實(shí)際內(nèi)容。
(1) Keywords (關(guān)鍵字)

    說(shuō)明:為搜索引擎提供的關(guān)鍵字列表 
    用法:  <meta name="Keywords" Content="關(guān)鍵詞1,關(guān)鍵詞2,關(guān)鍵詞3,關(guān)鍵詞4,……">
    <meta name="Kyewords" Lang="EN" Content="vacation,greece,sunshine"> 
    <meta name="Kyewords" Lang="FR" Content="vacances,grè:ce,soleil">
    注意:各關(guān)鍵詞間用英文逗號(hào)“,”隔開(kāi)。META的通常用處是指定搜索引擎用來(lái)提高搜索質(zhì)量的關(guān)鍵詞。當(dāng)數(shù)個(gè)META元素提供文檔語(yǔ)言從屬信息時(shí),搜索引擎會(huì)使用lang特性來(lái)過(guò)濾并通過(guò)用戶(hù)的語(yǔ)言?xún)?yōu)先參照來(lái)顯示搜索結(jié)果。

(2) Description (簡(jiǎn)介)

    說(shuō)明:Description用來(lái)告訴搜索引擎你的網(wǎng)站主要內(nèi)容。
    用法: <meta name="Description" Content="你網(wǎng)頁(yè)的簡(jiǎn)述">

(3) Robots (機(jī)器人向?qū)?

    說(shuō)明:Robots用來(lái)告訴搜索機(jī)器人哪些頁(yè)面需要索引,哪些頁(yè)面不需要索引。Content的參數(shù)有all、none、index、noindex、follow、nofollow。默認(rèn)是all。
    用法:<meta name="Robots" Content="All|None|Index|Noindex|Follow|Nofollow">
    其中的屬性說(shuō)明如下:
    all:文件將被檢索,且頁(yè)面上的鏈接可以被查詢(xún);
    none:文件將不被檢索,且頁(yè)面上的鏈接不可以被查詢(xún);(和 "noindex, no follow" 起相同作用)
    index:文件將被檢索;(讓robot/spider登錄)
    follow:頁(yè)面上的鏈接可以被查詢(xún);
    noindex:文件將不被檢索,但頁(yè)面上的鏈接可以被查詢(xún);(不讓robot/spider登錄)
    nofollow:文件將不被檢索,頁(yè)面上的鏈接可以被查詢(xún)。(不讓robot/spider順著此頁(yè)的連接往下探找)

(4) Author (作者)

    說(shuō)明:標(biāo)注網(wǎng)頁(yè)的作者或制作組
    用法:<meta name="Author" Content="張三,zs@sina.com"> 
    注意:Content可以是:你或你的制作組的名字,或Email

(5) Copyright (版權(quán))

    說(shuō)明:標(biāo)注版權(quán)  
    用法:<meta name="Copyright" Content="本頁(yè)版權(quán)歸xxx所有。All Rights Reserved">

(6) Generator (編輯器)

    說(shuō)明:編輯器的說(shuō)明 
    用法:<meta name="Generator" Content="PCDATA|FrontPage|"> 
    注意:Content="你所用編輯器"

(7) revisit-after (重訪)

    用法:<META name="revisit-after" CONTENT="7 days" >

匯總

<!DOCTYPE html> <!-- 使用 HTML5 doctype,不區(qū)分大小寫(xiě) -->
<html lang="zh-cmn-Hans"> <!-- 更加標(biāo)準(zhǔn)的 lang 屬性寫(xiě)法 http://zhi.hu/XyIa -->
<head>
 <!-- 聲明文檔使用的字符編碼 -->
 <meta charset='utf-8'>
 <!-- 優(yōu)先使用 IE 最新版本和 Chrome -->
 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
 <!-- 頁(yè)面描述 -->
 <meta name="description" content="不超過(guò)150個(gè)字符"/>
 <!-- 頁(yè)面關(guān)鍵詞 -->
 <meta name="keywords" content=""/>
 <!-- 網(wǎng)頁(yè)作者 -->
 <meta name="author" content="name, email@gmail.com"/>
 <!-- 搜索引擎抓取 -->
 <meta name="robots" content="index,follow"/>
 <!-- 為移動(dòng)設(shè)備添加 viewport -->
 <meta name="viewport" content="initial-scale=1, maximum-scale=3, minimum-scale=1, user-scalable=no">
 <!-- `width=device-width` 會(huì)導(dǎo)致 iPhone 5 添加到主屏后以 WebApp 全屏模式打開(kāi)頁(yè)面時(shí)出現(xiàn)黑邊 http://bigc.at/ios-webapp-viewport-meta.orz -->
 
 <!-- iOS 設(shè)備 begin -->
 <meta name="apple-mobile-web-app-title" content="標(biāo)題">
 <!-- 添加到主屏后的標(biāo)題(iOS 6 新增) -->
 <meta name="apple-mobile-web-app-capable" content="yes"/>
 <!-- 是否啟用 WebApp 全屏模式,刪除蘋(píng)果默認(rèn)的工具欄和菜單欄 -->
 
 <meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
 <!-- 添加智能 App 廣告條 Smart App Banner(iOS 6+ Safari) -->
 <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
 <!-- 設(shè)置蘋(píng)果工具欄顏色 -->
 <meta name="format-detection" content="telphone=no, email=no"/>
 <!-- 忽略頁(yè)面中的數(shù)字識(shí)別為電話,忽略email識(shí)別 -->
 <!-- 啟用360瀏覽器的極速模式(webkit) -->
 <meta name="renderer" content="webkit">
 <!-- 避免IE使用兼容模式 -->
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <!-- 針對(duì)手持設(shè)備優(yōu)化,主要是針對(duì)一些老的不識(shí)別viewport的瀏覽器,比如黑莓 -->
 <meta name="HandheldFriendly" content="true">
 <!-- 微軟的老式瀏覽器 -->
 <meta name="MobileOptimized" content="320">
 <!-- uc強(qiáng)制豎屏 -->
 <meta name="screen-orientation" content="portrait">
 <!-- QQ強(qiáng)制豎屏 -->
 <meta name="x5-orientation" content="portrait">
 <!-- UC強(qiáng)制全屏 -->
 <meta name="full-screen" content="yes">
 <!-- QQ強(qiáng)制全屏 -->
 <meta name="x5-fullscreen" content="true">
 <!-- UC應(yīng)用模式 -->
 <meta name="browsermode" content="application">
 <!-- QQ應(yīng)用模式 -->
 <meta name="x5-page-mode" content="app">
 <!-- windows phone 點(diǎn)擊無(wú)高光 -->
 <meta name="msapplication-tap-highlight" content="no">
 <!-- iOS 圖標(biāo) begin -->
 <link rel="apple-touch-icon-precomposed" href="/apple-touch-icon-57x57-precomposed.png"/>
 <!-- iPhone 和 iTouch,默認(rèn) 57x57 像素,必須有 -->
 <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/apple-touch-icon-114x114-precomposed.png"/>
 <!-- Retina iPhone 和 Retina iTouch,114x114 像素,可以沒(méi)有,但推薦有 -->
 <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144x144-precomposed.png"/>
 <!-- Retina iPad,144x144 像素,可以沒(méi)有,但推薦有 -->
 <!-- iOS 圖標(biāo) end -->
 
 <!-- iOS 啟動(dòng)畫(huà)面 begin -->
 <link rel="apple-touch-startup-image" sizes="768x1004" href="/splash-screen-768x1004.png"/>
 <!-- iPad 豎屏 768 x 1004(標(biāo)準(zhǔn)分辨率) -->
 <link rel="apple-touch-startup-image" sizes="1536x2008" href="/splash-screen-1536x2008.png"/>
 <!-- iPad 豎屏 1536x2008(Retina) -->
 <link rel="apple-touch-startup-image" sizes="1024x748" href="/Default-Portrait-1024x748.png"/>
 <!-- iPad 橫屏 1024x748(標(biāo)準(zhǔn)分辨率) -->
 <link rel="apple-touch-startup-image" sizes="2048x1496" href="/splash-screen-2048x1496.png"/>
 <!-- iPad 橫屏 2048x1496(Retina) -->
 
 <link rel="apple-touch-startup-image" href="/splash-screen-320x480.png"/>
 <!-- iPhone/iPod Touch 豎屏 320x480 (標(biāo)準(zhǔn)分辨率) -->
 <link rel="apple-touch-startup-image" sizes="640x960" href="/splash-screen-640x960.png"/>
 <!-- iPhone/iPod Touch 豎屏 640x960 (Retina) -->
 <link rel="apple-touch-startup-image" sizes="640x1136" href="/splash-screen-640x1136.png"/>
 <!-- iPhone 5/iPod Touch 5 豎屏 640x1136 (Retina) -->
 <!-- iOS 啟動(dòng)畫(huà)面 end -->
 
 <!-- iOS 設(shè)備 end -->
 <meta name="msapplication-TileColor" content="#000"/>
 <!-- Windows 8 磁貼顏色 -->
 <meta name="msapplication-TileImage" content="icon.png"/>
 <!-- Windows 8 磁貼圖標(biāo) -->
 
 <link rel="alternate" type="application/rss+xml" title="RSS" href="/rss.xml"/>
 <!-- 添加 RSS 訂閱 -->
 <link rel="shortcut icon" type="image/ico" href="/favicon.ico"/>
 <!-- 添加 favicon icon -->
 
 <title>標(biāo)題</title>
</head>
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • meta分類(lèi)meta標(biāo)簽分兩大部分:HTTP標(biāo)題信息(HTTP-EQUIV)和頁(yè)面描述信息(NAME)。1、 H...
    寒梁沐月閱讀 1,718評(píng)論 2 14
  • 1. meta標(biāo)簽的組成 meta標(biāo)簽共有兩個(gè)屬性,它們分別是http-equiv屬性和name屬性 1. nam...
    Maggie_77閱讀 612評(píng)論 1 1
  • meta ??元素可提供相關(guān)頁(yè)面的元信息(meta-information),比如針對(duì)搜索引擎和更新頻度的描述和關(guān)...
    鹿守心畔光閱讀 842評(píng)論 0 2
  • meta 是用來(lái)在HTML文檔中模擬HTTP協(xié)議的響應(yīng)頭報(bào)文。meta 標(biāo)簽用于網(wǎng)頁(yè)的<head>與<...
    __HAPPINESS_yh閱讀 1,295評(píng)論 1 1
  • 1.查看當(dāng)前地址 所有的項(xiàng)目 window-》new Repository Browser 在這里可以對(duì)你svn ...
    sirai閱讀 1,925評(píng)論 0 0

友情鏈接更多精彩內(nèi)容