Why bgcolor attribute is not working in svg | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Why bgcolor attribute is not working in svg

https://code.sololearn.com/WT0pGo4JVEiW/?ref=app

13th Mar 2020, 4:40 PM
Himanshu Rai
Himanshu Rai - avatar
3 Answers
+ 6
bgcolor Supported tags: body marquee table tBody td tFoot th tHead tr 👉The bgcolor attribute is not supported in HTML5. Source: geekforgeeks
13th Mar 2020, 5:15 PM
Kashyap Kumar
Kashyap Kumar - avatar
+ 4
Bro svg was introduced in html5 so it doesn't support the previous styles Use CSS U can use inline CSS <svg .......style="background-color:skyblue;"
13th Mar 2020, 7:09 PM
xym
xym - avatar
+ 2
use CSS instead svg { width:500px; height:500px; background-color:skyblue; }
13th Mar 2020, 6:15 PM
dozule
dozule - avatar