Easy Tutorial
❮ Prop Canvas Linejoin Met Console Clear ❯

Body bgColor Property


Definition and Usage

The bgColor property sets or returns the value of the bgcolor attribute of the body element.

The bgcolor attribute specifies the background color of the document.

Syntax

Set the bgColor property:

Return the bgColor property:

Value Description
color Specifies the background color. See the full list of CSS Color Values

Browser Support

All major browsers support the bgColor property.


Example

Return the bgcolor attribute value of the body element:


❮ Prop Canvas Linejoin Met Console Clear ❯