+ 3

What is the difference between background-color and bgcolor??

14th Mar 2018, 12:10 PM
H M Khalid Mahmud
H M Khalid Mahmud - avatar
3 odpowiedzi
+ 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
14th Mar 2018, 12:18 PM
📈SmileGoodHope📈
📈SmileGoodHope📈 - avatar
+ 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
14th Mar 2018, 6:17 PM
visph
visph - avatar
0
'bgcolor' is mostly inline and 'background-color' is a property but can still be used as inline.
9th May 2019, 4:32 AM
Emmanuel Festus Enang
Emmanuel Festus Enang - avatar