關於頁面Meta屬性

meta標籤的組成
meta標籤共有兩個屬性,它們分別是http-equiv屬性和name屬性,不一樣的屬性又有不一樣的參數值,這些不一樣的參數值就實現了不一樣的網頁功能。
一、name屬性
name屬性主要用於描述網頁,與之對應的屬性值爲content,content中的內容主要是便於搜索引擎機器人查找信息和分類信息用的。
meat標籤的name屬性語法格式是:<meta name="參數" content="具體的參數值">。
其中name屬性主要有如下幾種參數:
A、Keywords(關鍵字)
舉例:<meta name ="keywords" content="science, education,culture,politics,ecnomics,relationships, entertaiment, human">
B、description(網站內容描述)
說明:description用來告訴搜索引擎你的網站主要內容。
舉例:<meta name="description" content="This page is about the meaning of science, education,culture.">
C、robots(機器人嚮導)
content的參數有all,none,index,noindex,follow,nofollow。默認是all。
舉例:<meta name="robots" content="none">
D、author(做者)
說明:標註網頁的做者
E、viewport設置頁面大小
width - viewport的寬度 height - viewport的高度initial-scale - 初始的縮放比例minimum-scale - 容許用戶縮放到的最小比例maximum-scale - 容許用戶縮放到的最大比例user-scalable - 用戶是否能夠手動縮放
相關文章
相關標籤/搜索