国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

HTML基礎(chǔ)教學之<meta>標籤

<meta>的主要作用,是提供網(wǎng)頁的元資訊。例如:指定網(wǎng)頁的搜尋關(guān)鍵字。

<meta>標記有兩個屬性:http-equiv和name。

http-equiv屬性

  • #?功能:模擬http協(xié)定檔頭訊息,當訊息從伺服器端傳到客戶端時,告訴瀏覽器如何正確的顯示網(wǎng)頁內(nèi)容。

  • ?http-equiv屬性一般要與content屬性搭配使用。 Content屬性指定資訊的詳細參數(shù)。

(1)設(shè)定網(wǎng)頁的字元集

#<meta http-equiv="Content-Type" content="text/html ; charset=utf-8" />

這個我們在前面的例子中已經(jīng)接觸過很多次了

(2)網(wǎng)頁自動刷新

<meta http-equiv="refresh" content="2">???//每隔2秒鐘,自動刷新網(wǎng)頁一次

<meta http-equiv="refresh" content= "2;url=http://www.baidu.com">???//2秒鐘後,跳到百度

?來看個實例

<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta http-equiv="refresh" content="2;url=http://www.baidu.com">
    </head>
    <body>
        <h1>歡迎加入php.cn</h1>
        <h2>希望你能夠在這里學的開心</h2>
    </body>
</html>


#name屬性

#name屬性主要用於設(shè)定網(wǎng)頁的搜尋關(guān)鍵字、版權(quán)資訊、作者等。

來看一個網(wǎng)站的搜尋結(jié)果

9.png

(1)第一部分為設(shè)定網(wǎng)頁搜尋關(guān)鍵字

<meta name= "keywords" content="小豬cms,pigcms,微信公眾平臺原始碼,微信分銷,微信開發(fā),微信o2o源碼..." />

(2)第二部分為設(shè)定網(wǎng)頁描述資訊

<meta name="description" content="小豬cms是國家高新技術(shù)企業(yè),雙軟認證企業(yè),資深微信開發(fā)專家,提供微信行銷系統(tǒng),o2o系統(tǒng),微信分銷,微信應用號源碼程式,公司客戶遍布世界各地」>

繼續(xù)學習
||
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="refresh" content="2;url=http://www.baidu.com"> </head> <body> <h1>歡迎加入php.cn</h1> <h2>希望你能夠在這里學的開心</h2> </body> </html>