当前位置: 首页 > 网络学院 > 网页制作基础教程 > HTML > HTML <body>标签
The body element defines the documents' body. It contains all the contents of the document (like text, images, colors, graphics, etc.).
body元素定义了文档的主体。它包括所有文档的内容(如文章,图片,颜色等)
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中已经不再被支持。
<html> <head> </head> <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(框架)
属性 | 值 | 描述 | 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 |
id, class, title, style, dir, lang, xml:lang |
For a full description, go to Standard Attributes.
查看完整的描述
onload, onunload, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup |
For a full description, go to Event Attributes.
查看完整描述
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.
为页面加上背静图案