The bgcolor attribute in HTML 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
element, as in the example below, the entire body background is changed to white.Bg, Color terms, HTML
Today, instead of using this attribute to define a background color, use the CSS “background-color” property.
Related information
- How to change the background and text color of a web page.
- Full list of HTML color codes.