How to give an element its own background colour independent from the body background color | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to give an element its own background colour independent from the body background color

I know I can use the bgcolor tag to create a background colour. But it seems not to be working for me with headings. I want to align and h3 element to center with a font and bgcolor different from that of the other body elements. Thanks

21st Oct 2017, 8:28 AM
ALAINGIRESSE ETONGO
ALAINGIRESSE ETONGO - avatar
1 Answer
+ 7
You could use CSS and HTML <div> tags, like <div> id and class.
21st Oct 2017, 8:30 AM
Learnsolo