The attribute used by the body element for background color is bgcolor. The bgcolor attribute is used to specify the background color of the table. Syntax structure: [ ], where color_name indicates that the specified color value is the background color of the color name.
The attribute bgcolor of the body element is used for the background color.
(Recommended tutorial: html tutorial)
Attribute introduction:
bgcolor attribute is used to specify the background color of the table.
Grammar structure:
Attribute value introduction:
color_name Specifies that the color value is the background color of the color name (such as "red" ).
hex_number specifies the background color whose color value is a hexadecimal value (such as "#ff0000").
rgb_number specifies the color value as the background color of the rgb code (such as "rgb(255,0,0)").
Note:
In HTML 4.01, the use of the bgcolor attribute of the body element is deprecated; in XHTML 1.0 Strict DTD, the bgcolor attribute of the body element is not supported.
It is recommended to use CSS instead.
CSS syntax: