how to set html background color
Setting a Solid Background Color. 1  1. Open your HTML file in your favorite text editor. 2  2. Add the tags to your document. 3  3. Type the body element inside the tags.  4. Add the background-color property to the body 1  element. 5. Add your desired background color to the background-color property.