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

HTML
HTML Head
HTML Meta
HTML URLs
HTML Scripts
HTML 属性
HTML 事件
HTML URL-encode
HTML Web服务器
HTML 摘要
HTML 实例
标签列表
标准属性
事件属性
ASCII码
特殊字符
HTTP状态消息

HTML Head


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

Examples
例子

The title of a document文档的标题
The title information inside a head element is not displayed in the browser window.
在head元素里的标题信息是不会在浏览器窗口中显示的。

One target for all links给所有连接添加一个目标
This example demonstrates how to use the base tag to let all the links on a page open in a new window.
这个例子演示了怎么去让一个页面中的所有连接目标从一个新窗口打开。


The Head Element
头部元素

The head element contains general information, also called meta-information, about a document. Meta means "information about".
头部元素包含了一般的数据,也叫做关于一个文档的META数据,META意思是"关于"。

You can say that meta-data means information about data, or meta-information means information about information.
你可以这么理解META数据是关于数据的信息或者META数据是关于信息的信息。


Information Inside the Head Element
在Head元素中的信息

The elements inside the head element should not be displayed by a browser. 
在head元素里的内容浏览器是不会显示的。

According to the HTML standard, only a few tags are legal inside the head section. These are: <base>, <link>, <meta>, <title>, <style>, and <script>. 
根据HTML标准只有部分标签在HEAD区段是合法的。其中就有:<base>, <link>, <meta>, <title>, <style>, 和 <script>.

Look at the following illegal construct:
不合理的结构:

<head>
<p>This is some text</p>

</head>

In this case the browser has two options:
这类情况下浏览器有两种选择:

  • Display the text because it is inside a paragraph element
    因它是内嵌的一个段落元素而显示文本
  • Hide the text because it is inside a head element
    因它内嵌在head元素中而隐藏文本

If you put an HTML element like <h1> or <p> inside a head element like this, most browsers will display it, even if it is illegal.
如果你在head元素中放入像<h1>或者<p>这类HTML元素的话,大多数浏览器会显示,哪怕它是非法的。

Should browsers forgive you for errors like this? We don't think so. Others do.
浏览器应该忽略你这累错误?我们并不这么认为。


Head Tags
Head标签

Tag
标签
Description
描述
<head> Defines information about the document
为文档定义相关信息
<title> Defines the document title
定义文档标题
<base> Defines a base URL for all the links on a page
为一个页面定义所有基础链接
<link> Defines a resource reference
定义参考源
<meta> Defines meta information
定义MEAT信息

Tag
标签
Description
描述
<!DOCTYPE> Defines the document type. This tag goes before the <html> start tag.
定义文档类型.这个标签必须是在<html>之前使用

评论 (0) All

登陆 | 还没注册?