About bgcolor attribute | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

About bgcolor attribute

The bgcolor attribute lies within the body tag. I created an HTML document with multiple body tags. I put the attribute in the first tag but it changed the color everywhere. The whole page took the background color. So is it possible to change ONLY the bodies I want to?

9th Jul 2020, 4:43 PM
Rahbar Tahsin
Rahbar Tahsin - avatar
1 Answer
+ 6
1.You should use one body tag only 2. And use multiple section tag or div tag in body https://www.sololearn.com/learn/HTML/2195/?ref=app 3. Use CSS for styling by adding different class names to different section (or div) https://www.sololearn.com/learn/CSS/1103/ 4. a demo https://code.sololearn.com/W35FNQHg0VEI/?ref=app
9th Jul 2020, 4:45 PM
Gordon
Gordon - avatar