当前位置: 首页 > 网络学院 > 网页制作基础教程 > HTML > HTML Meta

HTML
HTML 介绍
HTML 元素
HTML 基本标签
HTML 格式
HTML 实体字符
HTML 链接
HTML 框架
HTML 表格
HTML 列表
HTML 表单
HTML 图片
HTML 背景
HTML 颜色
HTML 颜色值
HTML 颜色名
HTML 便条
HTML 布局
HTML 字体
HTML 4.0
HTML 样式

HTML Meta


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 644 ::
收藏到网摘: n/a

Examples
例子

Document description
文档描述
Information inside a meta element describes the document.
在meta元素中的文档描述信息。

Document keywords
文档关键子
Information inside a meta element describes the document's keywords.
在meta元素中的文档关键字信息。

Redirect a user
用户转向
This example demonstrates how to redirect a user if your site address has changed.
当你的网站地址改变时让用户自动转向到新的地址。


The Meta Element
Meta元素

As we explained in the previous chapter, the head element contains general information (meta-information) about a document.
就像我们在前章解释的,head元素包含了一个文档的总体信息。

HTML also includes a meta element that goes inside the head element. The purpose of the meta element is to provide meta-information about the document.
HTML在head元素里也包含了meta元素。意图就是用meta元素来给文档提供相关的meta信息。

Most often the meta element is used to provide information that is relevant to browsers or search engines like describing the content of your document.
大多数meta元素是用来给浏览器和搜索引擎提供和你的文档内容相关的信息。

Note: W3C states that "Some user agents support the use of META to refresh the current page after a specified number of seconds, with the option of replacing it by a different URI. Authors should not use this technique to forward users to different pages, as this makes the page inaccessible to some users. Instead, automatic page forwarding should be done using server-side redirects" at http://www.w3.org/TR/html4/struct/global.html#adef-http-equiv.
(讲了一些使用meta来转向和刷新页面的不利之处,最好的解决办法是在服务端做调整。)
http://www.w3.org/TR/html4/struct/global.html#adef-http-equiv.


Keywords for Search Engines
搜索引擎关键字

Some search engines on the WWW will use the name and content attributes of the meta tag to index your pages.
在WWW上一些搜索引擎使用meta中的name和content属性来引索你的页面。

This meta element defines a description of your page:
这个meta元素定义了你的页面描述:

<meta name="description" content="Free Web tutorials on HTML, CSS, XML, and XHTML">

 

This meta element defines keywords for your page:
定义你页面的关键字:

<meta name="keywords" content="HTML, DHTML, CSS, XML, XHTML, JavaScript, VBScript">

The intention of the name and content attributes is to describe the content of a page.
name和content属性的意图是用来描述一个页面的内容。

However, since too many webmasters have used meta tags for spamming, like repeating keywords to give pages a higher ranking, some search engines have stopped using them entirely.
然而,自从有太多的网站站长为提高网站在搜索引擎中的排名将meta标签中的关键字反复的使用后,一些搜索引擎已经放弃使用它们了。

You can read more about search engines in our Web Building Tutorial.
你可以在我们Web Building教程上获取更多关于搜索引擎的知识。


Unknown Meta Attributes
未知的meta属性

Sometimes you will see meta attributes that are unknown to you like this:
有时候你会看到一些对你来说是很陌生的meta属性:

<meta name="security" content="low">

Then you just have to accept that this is something unique to the site or to the author of the site, and that it has probably no relevance to you.
这个对网站作者或网站来说有特别意义而对你来说无关紧要的东西,只需要接受就行。

You can see a complete list of the meta element attributes in our
你可以参考完整的meta元素属性离列表:
完整的 HTML 4.01标签参考 

评论 (0) All

登陆 | 还没注册?