+ 3
What is the difference between background-color and bgcolor??
3 Answers
+ 3
The bgcolor attribute specifies the background color of a document.
The <body> bgcolor attribute is not supported in HTML5. Use CSS instead. CSS syntax: <body style="background-color:#E6E6FA"> CSS Example: Set the background color of a document. In our CSS tutorial you can find more details about the background-color property.
HTML body bgcolor Attribute - W3SchoolsW3Schools âș tags âș att_body_bgcolor.asp
+ 3
'bgcolor' is an html attribute, deprecated since html4.01.
'background-color' is a css property.
Both are intented to change the background (bg) color...
'bgColor' was also a DOM JS API property, deprecated since DOM level 2.
https://developer.mozilla.org/en-US/docs/Web/API/Document/bgColor
0
'bgcolor' is mostly inline and 'background-color' is a property but can still be used as inline.