<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

1000.png

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

#linktextvlink
PropertiesValueDescription
alinkcolorHTML5 is not supported. HTML 4.01 is deprecated. Specifies the color of active links in the document.
backgroundURLHTML5 Not supported. HTML 4.01 is deprecated. Specifies the background image of the document.
bgcolorcolor##HTML5 is not supported. HTML 4.01 is deprecated. Specifies the background color of the document.
colorHTML5 Not supported. HTML 4.01 is deprecated. Specifies the color of unvisited links in the document.
colorHTML5 Not supported. HTML 4.01 is deprecated. Specifies the color of all text in the document.
colorHTML5 is not supported. HTML 4.01 is deprecated. Specifies the color of visited links in the document.


Global attributes

The<body> tag supports global attributes of HTML.


Event attributes

<body> tag supports HTML event attributes.


Related Articles

HTML Tutorial: HTML Elements

HTML DOM Reference Manual: Body Object