<body>
HTML <body> Tag
Instance
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>文档标题</title> </head> <body> 文档内容...... </body> </html>
Run Example»
Click the "Run Instance" button to view the online instance
Browser support
All major browsers support< body> tag.
Tag definition and usage instructions
<body> tag defines the body of the document. The
<body> element contains all the content of the document (such as text, hyperlinks, images, tables, lists, etc.).
Differences between HTML 4.01 and HTML5
In HTML 5, the "rendering attribute" of all body elements has been removed.
In HTML 4.01, the "rendering attribute" of all body elements has been deprecated.
Properties
Properties | Value | Description |
---|---|---|
alink | color | HTML5 is not supported. HTML 4.01 is deprecated. Specifies the color of active links in the document. |
background | URL | HTML5 Not supported. HTML 4.01 is deprecated. Specifies the background image of the document. |
bgcolor | color | ##HTML5 is not supported. HTML 4.01 is deprecated. Specifies the background color of the document. |
color | HTML5 Not supported. HTML 4.01 is deprecated. Specifies the color of unvisited links in the document. | |
color | HTML5 Not supported. HTML 4.01 is deprecated. Specifies the color of all text in the document. | |
color | HTML5 is not supported. HTML 4.01 is deprecated. Specifies the color of visited links in the document. |
Global attributesThe<body> tag supports global attributes of HTML.
Event attributes<body> tag supports HTML event attributes.
Related ArticlesHTML Tutorial: HTML ElementsHTML DOM Reference Manual: Body Object