1. 程式人生 > >HTML 5 <meta> 標簽

HTML 5 <meta> 標簽

apple 最新 設備 webkit -s 重要 for keyword asc

meta標簽可以:

一、定義針對搜索引擎的關鍵詞,如:

<meta name="keywords" content="HTML, CSS, XML, XHTML, JavaScript" />二。  

二、定義對頁面的描述

<meta name="description" content="HTML 5 meta標簽>"  

三、定義頁面的最新版本

<meta name="revised" content="David, 2008/8/8/" />  

四、每5秒刷新一下頁面

<meta http-equiv="refresh" content="5" />

  請關註http://www.w3school.com.cn/html5/html5_meta.asp

1、首先我們來看看webkit內核中的一些私有的meta標簽,這些meta標簽在開發webapp時起到非常重要的作用

<meta content=”width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;” name=”viewport” />

<meta content=”yes” name=”apple-mobile-web-app-capable” />

<meta content=”black” name=”apple-mobile-web-app-status-bar-style” />

<meta content=”telephone=no” name=”format-detection” />
第一個meta標簽表示:強制讓文檔的寬度與設備的寬度保持1:1,並且文檔最大的寬度比例是1.0,且不允許用戶點擊屏幕放大瀏覽;

第二個meta標簽是iphone設備中的safari私有meta標簽,它表示:允許全屏模式瀏覽;

第三個meta標簽也是iphone的私有標簽,它指定的iphone中safari頂端的狀態條的樣式;

第四個meta標簽表示:告訴設備忽略將頁面中的數字識別為電話號碼。轉自https://www.douban.com/note/278923174/

HTML 5 <meta> 標簽