English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The HTML <body> tag defines the main content of an HTML document or part of an HTML document, which will be visible directly on your webpage. This tag is also commonly referred to as the <body> element.
A simple HTML document containing the minimum necessary tags:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Document title</title> </head> <body> Document content...... </body> </html>Test and see ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the <body> tag.
The <body> tag defines the body of a document.
The HTML <body> element is located within the <html> tag.
The most common elements in the HTML <body> tag are: <h1>,《p》,《div》和《table》tags.
In HTML 5 In, all body elements' 'presentation attributes' have been removed.
In HTML 4.01 In, all body elements' 'presentation attributes' are deprecated.
Attribute | Value | Description |
---|---|---|
alink | color | HTML5 Not supported. HTML 4.01 Deprecated. Specifies the color of active links in the document. |
background | URL | HTML5 Not supported. HTML 4.01 Deprecated. Specifies the background image of the document. |
bgcolor | color | HTML5 Not supported. HTML 4.01 Deprecated. Specifies the background color of the document. |
link | color | HTML5 Not supported. HTML 4.01 Deprecated. Specifies the color of unvisited links in the document. |
text | color | HTML5 Not supported. HTML 4.01 Deprecated. Specifies the color of all text in the document. |
vlink | color | HTML5 Not supported. HTML 4.01 Deprecated. Specifies the color of visited links in the document. |
<body> tag supports HTML Global Attributes.
<body> tag supports HTML Event Attributes.
HTML Tutorial: HTML Elements
HTML DOM Reference Manual:Body Object