当前位置: 首页 > 网络学院 > 网页制作基础教程 > HTML > HTML <body>标签

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

HTML <body>标签


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

Definition and Usage
用法

The body element defines the documents' body. It contains all the contents of the document (like text, images, colors, graphics, etc.).
body元素定义了文档的主体。它包括所有文档的内容(如文章,图片,颜色等)


Differences Between HTML and XHTML
在HTML和XHTML中的区别

All "presentation attributes" of the body element were deprecated in HTML 4.01.
所有body元素的属性在HTML4,01中不再支持

All "presentation attributes" of the body element are not supported in XHTML 1.0 Strict DTD.
所有body元素的属性在XHTML1.0严密型DTD中已经不再被支持。


Example
实例

<html>
<head>
</head>

<body>
The content of the document......
</body>

</html>



Optional Attributes
可选属性

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

属性 描述 DTD
alink rgb(x,x,x)
#xxxxxx
colorname
Specifies the color of the active links in the document. Deprecated. Use styles instead.
指定文档中活动连接的颜色。[不推荐]使用样式来取代
TF
background file_name An image to use as the background. Deprecated. Use styles instead.
图片背景[不推荐]使用样式来取代
TF
bgcolor rgb(x,x,x)
#xxxxxx
colorname
The background color of the document. Deprecated. Use styles instead.
文档的背景颜色[不推荐]使用样式来取代
TF
link rgb(x,x,x)
#xxxxxx
colorname
Specifies the color of all the links in the document. Deprecated. Use styles instead.
指定文档的所有连接颜色[不推荐]使用样式来取代
TF
text rgb(x,x,x)
#xxxxxx
colorname
Specifies the color of the text in the document. Deprecated. Use styles instead.
指定文档文字的颜色[不推荐]使用样式来取代
TF
vlink rgb(x,x,x)
#xxxxxx
colorname
Specifies the color of the visited links in the document. Deprecated. Use styles instead.
指定文档那些被访问过的连接颜色[不推荐]使用样式来取代
TF

Standard Attributes
标准属性

id, class, title, style, dir, lang, xml:lang

For a full description, go to Standard Attributes.
查看完整的描述

Event Attributes
事件属性

onload, onunload, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

For a full description, go to Event Attributes.
查看完整描述


Try-It-Yourself Demos
演示

A very simple document
A very simple document, with only a minimum of tags. It demonstrates how the text inside a body element is displayed in the browser.
这是个非常简单的HTML文档举例,只使用了少量的HTML标签。它所要演示的是浏览器中在body元素中的文字是怎样显现的。

Background color
Adding a background color to a page.
为页面加上背静颜色

Background image
Adding a background image to a page.
为页面加上背静图案

评论 (0) All

登陆 | 还没注册?