首頁  >  文章  >  web前端  >  Meta標籤詳解_經驗交流

Meta標籤詳解_經驗交流

WBOY
WBOY原創
2016-05-16 12:09:241626瀏覽

★HTTP-EQUIV 
  HTTP-EQUIV類似於HTTP的頭部協議,它回應給瀏覽器一些有用的信息,以幫助正確和精確地顯示網頁內容。常用的HTTP-EQUIV類型有: 


  1、Content-Type和Content-Language (顯示字元集的設定) 

  說明:設定頁使用的字元集用以說明主頁製作所使用的文字已經語言,瀏覽器會根據此來呼叫對應的字元集顯示page內容。 

  用法:
       

     頁標註: 該字碼所使用的數字集標為21212123212525253字2172123725225222522524號不標的碼。如果將其中的“charset=GB2312”替換成“BIG5”,則該頁面所使用的字元集就是繁體中文Big5碼。當你瀏覽一些國外的網站時,IE瀏覽器會提示你要正確顯示該頁面需要下載xx語支援。這個功能就是透過讀取HTML頁面META標籤的Content-Type屬性而得知需要使用哪種字元集顯示該頁面的。如果系統裡沒有裝對應的字元集,則IE會提示下載。其他的語言也對應不同的charset,例如日文的字元集是“iso-2022-jp ”,韓文的是“ks_c_5601”。
      
  Content-Type的Content也可以是:text/xml等文件類型;
  Charset選項:ISO-8859-1(英文)、BIG5、UTF-8、SHSHIFT、J-8859-1(E)、BIG5、UTF-8、SHSHIFT、Koicon、BIG5、 -2、us-ascii, x-mac-roman, iso-8859-2, x-mac-ce, iso-2022-jp, x-sjis, x-euc-jp,euc-kr, iso-2022-kr , gb2312, gb_2312-80, x-euc-tw, x-cns11643-1,x-cns11643-2等字元集;Content-Language的Content還可以是:EN、FR等語言代碼。 

  2、Refresh (刷新) 

   說明:讓網頁多久(秒)刷新自己,或多久後讓網頁自動連結到其它網頁。
   用法:
      
   注意:其中的5是指停留5秒鐘後自動刷新到URL網址。 

  3、Expires (期限) 

   說明:指定網頁在快取中的過期時間,一旦網頁過期,必須到伺服器重新調閱。
   用法:
      
   注意:必須使用GMT的時間格式,或直接設定為0(9期>   注意:必須使用GMT的時間格式,或直接設定為0(問題期後數期)。 

  4、Pragma (cach模式) 

   說明:禁止瀏覽器從本機的快取中調閱頁內容。
   用法:
   注意:網頁不儲存在快取中,每次造訪都會重新整理頁面。這樣設定,訪客將無法離線瀏覽。

  5、Set-Cookie (cookie設定) 

  說明:瀏覽器存取某個頁面時會將它存在快取中,下次再次造訪時就可從快取中讀取,以提高速度。當你希望訪客每次都刷新你廣告的圖標,或每次都刷新你的計數器,就要禁用快取了。通常HTML檔案沒有必要停用緩存,對於ASP等頁面,就可以使用停用緩存,因為每次看到的頁面都是在伺服器動態產生的,快取就失去意義。如果網頁過期,那麼存檔的cookie將被刪除。
   用法:       21-98121-98]注意:必須使用GMT的時間格式。 

  6、Window-target (顯示視窗的設定) 

   說明:強制頁面在目前視窗以獨立頁面顯示。
   用法:
   注意:這個屬性是用來防止別人在框架裡呼叫你的頁面。 Content選項:_blank、_top、_self、_parent。

  7、Pics-label (網頁RSAC等級評定)
   說明:在IE的Internet選項中有一項內容設置,可以防止瀏覽一些受限制的網站,而網站的限制級
別就是透過該參數來設定的。
   用法:           〵        〵       〔.       I gen comment 'RSACi North America Sever' by 'inet@microsoft.com'         for 'http://www.microsoft.com' on '1997.06.30T14:21-0500') 🎜>   注意:不要將等級設定的太高。 RSAC的評估系統提供了一個用來評估Web網站內容的標準。使用者可以設定Microsoft Internet Explorer(IE3.0以上)來排除包含有色情和暴力內容的網站。上面這個範例中的HTML是取自Microsoft的首頁。程式碼中的(n 0 s 0 v 0 l 0)表示該網站不包含不健康內容。等級的評定是由RSAC,即美國娛樂委員會的評級機構評定的,如果你想進一步了解RSAC評估系統的等級內容,或者你需要評價自己的網站,可以訪問RSAC的網站:http://www.rsac .org/。 

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

   說明:這個是頁面被載入和調出時的一些特效。
   用法:

      

   注意:blendTrans是動態濾波的一種,產生漸隱效果。另一種動態濾鏡RevealTrans也可以用於頁面進入與退出效果: 

      
    表示濾鏡特效的持續時間(單位:秒)        Transition 濾鏡類型。表示使用哪一種特效,取值為0-23。

       0 矩形縮小
       1 長方形縮小
       1 .縮小🎜>     1     3 圓形擴充
       4 下到上刷新
       〠下到下到下    到右刷新
       7 右到左刷新
       7 豎葉窗
     8 豎葉窗       11 錯位豎百葉窗
    二  〠刷新
       14 中間到左右刷新
       15 中間到上下
       17 右下到左上
       18 右上到左下
      〠左下右上
       21 橫條
       22 豎條
     22 豎條
   〔  9、MSThemeCompatible (XP主題)
   說明:是否在IE中關閉 xp的主題
   用法:

   注意:關閉 xp 的藍色立體按鈕系統顯示樣式,從而和win2k 很像。 

  10、IE6 (頁生成器)
   說明:頁生成器generator,是ie6
   〜法 

  11、Content-Script-Type (腳本相關)
   說明:這是近來W3C的規範,指明頁中腳本的類型。
   用法:
   注意: 

  ★NAME變數 

   ★NAME變數 
  name是描述網頁的,內容對應於網頁分類(目前幾乎所有的搜尋引擎都使用網路機器人自動找出meta值來為網頁分類)。
  name的value值(name="")指定所提供資訊的類型。有些值是已經定義好的。例如description(說明)、keyword(關鍵字)、refresh(刷新)等。也可以指定其他任意值,如:creationdate(建立日期) 、
document ID(文件編號)和level(等級)等。
  name的content指定實際內容。如:如果指定level(等級)為value(值),則Content可能是beginner(初級)、intermediate(中級)、advanced(高級)。

  1、Keywords (關鍵字)
   說明:為搜尋引擎提供的關鍵字列表
   :       

      
 

  2、Description (簡介)
   說明:Description用來告訴搜索引擎你的網站主要內容。
   用法:

   注意: 
  3、Robots (機器人精靈)
   3、Robots (機器人精靈)    〔哪些頁面需要用標籤來說明哪些頁面。 Content的參數有all、none、index、noindex、follow、nofollow。預設是all。
   用法:
   注意:許多搜尋引擎都透過放出robot/spider搜尋來登入網站,這些robot/spider就要用到meta元素的一些特性來決定怎麼登入。

All: The file will be retrieved, and the links on the page can be queried;
none: The file will not be retrieved, and the links on the page cannot be queried; (and "noindex, no follow " plays the same role)
index: the file will be retrieved; (let the robot/spider log in)
follow: the links on the page can be queried;
noindex: the file will not be retrieved, but the links on the page Links can be queried; (do not allow robot/spider to log in)
nofollow: The file will not be retrieved, but the links on the page can be queried. (Do not allow robots/spiders to follow the links on this page to search down)

4. Author (Author)
Description: Mark the author or production team of the web page
Usage:
Note: Content can be: you or your production team’s name, or Email

5. Copyright (Copyright)
Description: Mark copyright
Usage:
Note :

6. Generator (Editor)
Description: Description of the editor
Usage:
Note: Content="the editor you are using"

7. revisit-after (revisit)
Instructions:
Usage:
Note:

★Some other usages in Head


1 , scheme (scheme)
Explanation: scheme can be used when name is used to specify how the value of content should
be interpreted.
Usage:
Note:

2. Link
Description: Link to file
Usage:
Note: On many websites, if you save it in your inbox, you will find that it is accompanied by a small icon. , if you click to enter again, you will also find a small icon in the address bar. Now you can easily achieve this function by just adding this paragraph to the header of your page. is used to link the current document to other URLs, but there will be no link button. It is used between

tags. The format is as follows:
  
  

3. Base (base link)
Instructions: Insert the base link attribute of the web page
Usage:
Note: All relative paths on your web page will be preceded by "http:// /www.cn8cn.com/”. Where target="_blank" is the link file to open in a new window, you can make other settings. Change "_blank" to "_parent" to mean that the linked file will be opened in the parent window of the current window; change to "_self" to open the linked file in the current window (frame); change to "_top" to display the linked file in full screen.
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn