Bgcolor

Updated: 09/12/2023 by Computer Hope

The bgcolor attribute in HTML (hypertext markup language) is now deprecated. In previous versions of HTML, it set the background color of an element in an HTML document. When set as the attribute of a <body> element, as in the example below, the entire body background is changed to white.

<body bgcolor="#FFFFFF">
Tip

Today, instead of using this attribute to define a background color, use the CSS (cascading style sheets) "background-color" property.

Bg, Color terms, HTML