Background color | SoloLearn: Learn to code for FREE!

+1

Background color

How would you change the background color in HTML?

6/8/2019 10:18:41 AM

Avacado

7 Answers

New Answer

+6

Found it! Sry it has text. <html> <head> <title>first page</title> </head> <body bgcolor="#000099"> <h1> <font color="#FFFFFF"> White headline </font> </h1> </body> </html>

+6

This is what I found! <p> <html> <head> <title>first page</title> </head> <body <h1> <font color="#FF0000"> Text Goes Here! Text is red.." </font> </h1> </body> </html></p>

+6

This is really HTML

+6

oh sry!

+2

You have to use CSS (or inline styling). Use the "background" or "background-color" property. Example: body { background: red; } /*The entire document's background is red*/ div { background-color: blue; } /*All the div elements' background is blue*/

+2

Check this thread on sololearn on how to use background color https://www.sololearn.com/learn/CSS/1103/

+2

Yeah but it doesn't change the background, just the font color