当前位置: 首页 > 网络学院 > 网页制作基础教程 > 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-04   浏览: 375 ::
收藏到网摘: n/a

定义与用法

The head element can contain information about the document. The browser does not display the "head information" to the user. The following tags can be in the head section: <base>, <link>, <meta>, <script>, <style>,  and <title>.
head元素可以包含有关文档的相关信息。浏览器不会把这些信息显示给用户。以下这些标签可以在head中使用:<base>,<link>,<script>,<style>以及<title>。


在HTML和XHTML中的区别

NONE


提示以及注意点

Always specify a title for the document!
一定要给文档加上标题


实例

代码
<html>

<head>
<title>Title of the document</title>
</head>

<body>
...
...
...
</body>

</html>



可选属性

DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.
下表中的DTD列指明了被支持的DTD属性。S=Strict(精确的),T=Transitional(传统的),F=Frameset(框架)

属性名 Value 描述 DTD
profile URL A space separated list of URL's that contains meta data information about the page
一个独立的空间,里面有包含meta信息在内的有关页面信息的列表
STF

标准属性

dir, lang, xml:lang

For a full description, go to Standard Attributes.
查看完整的属性


尝试与演示

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
How to use the base tag to let all the links on a page have the same target.
怎样用base标签让一个页面里的所有连接目标都一样。

Styles in HTML
How to format an HTML document with style information added to the <head> section.
如何在<head>里加上样式信息来格式化HTML文档

Link to an external style sheet
How to use the <link> tag to link to an external style sheet.
怎样使用<link>标签来给页面加入外来的样式表

Document description
Information inside a meta element describes the document.
给文档的meta元素里加上一些描述性的信息

Document keywords
Information inside a meta element describes the document's keywords.
meta元素里加上有关本文档的关键字

评论 (0) All

登陆 | 还没注册?