您的位置:首页 > Web前端 > HTML

HTML Meta标签知多少

2015-02-07 11:18 405 查看
文章已同步至个人Blog:Benjamin - 专注前端开发和用户体验

一、基本属性

标签常常被用来定义HTML文档的元数据或者HTTP协议的指向,这些元数据常用在SEO、HTML Pages or Apps on Mobile/Handheld Devices,该标签主要包括以下属性:

AttributeDescription
NameName for the property. Can be anything. Examples include, keywords, description, author, revised, generator etc.
contentSpecifies the property's value.
schemeSpecifies a scheme to interpret the property's value (as declared in the content attribute).
http-equivUsed for http response message headers. For example http-equiv can be used to refresh the page or to set a cookie. Values include content-type, expires, refresh and set-cookie.

二、基本的HTML Meta标签

?

三、OpenGraph Meta标签

为了提高站外内容的传播效率,2010年9月,在F8会议上Facebook公布了一套开放图景协议(Open Graph Protocol),任何网页只要遵守该协议,SNS就能从页面上提取最有效的信息并呈现给用户。通过Open Graph把其他社交网站建构的网络给连接起来,将创造一个更聪明、更与社交连接、更个人化也更具语意意识的网络。

?

四、公司/服务 Meta标签

4.1 CLAIMID

ClaimID was a website that allowed users to create unique profiles that showed personal websites, profiles at other sites, and other biographical information.

?

4.2 APPLE META TAGS

?

4.3 INTERNET EXPLORER META TAGS

?

4.4 TWEETMEME META TAGS

Tweetmeme跟踪Twitter上的链接,以给用户更好的体验。它使用一种常用的排序系统,以在这个微博世界里找出最热门的信息。

?

4.5 BLOG CATALOG META TAGS

?

4.6 RAILS META TAGS

?

五、创建自定义 Meta标签

Use custom meta tags to store data that you need in javascript, instead of hard-coding that data into your javascript. I store my Google Analytics code in meta tags. Here's some examples:

?

六、HTML Link 标签

6.1 HTML LINK TAGS

?

6.2 APPLE LINK TAGS

?

七、HTML5中的变化

The charset attribute specifies the character encoding used by the document. This is a character encoding declaration. If the attribute is present in an XML document, its value must be an ASCII case-insensitive match for the string "UTF-8" (and the document is therefore forced to use UTF-8 as its encoding).

The charset attribute on the meta element has no effect in XML documents, and is only allowed in order to facilitate migration to and from XHTML.

There must not be more than one meta element with a charset attribute per document.

八、参考链接

W3C HTML5 Meta Element

Metatags in HTML 5


HTML Meta Tags

COMPLETE LIST OF HTML META TAGS

DCMI Dublin Core Metadata Initiative

Apple-specific meta tags

LinkTagMeaning

Google Chrome HTML5 Tags

Facebook Open Graph META Tags
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: