How to set background colour in HTML? - ProProfs Discuss
Advertisement

How to set background colour in HTML?

How to set background colour in HTML?

Change Image    Delete

Asked by Deborah , Last updated: Nov 09, 2024

+ Answer
Request
Question menu
Vote up Vote down

1 Answer

T. Lopez

T. Lopez

Let's see how far my knowledge stretches

T. Lopez
T. Lopez, Biology student, Graduation, Detroit

Answered Sep 09, 2020

1. To set the background color in HTML, the first thing to do after determining the color you want to use is to open your HTML file with any text editor of your choice. There are so many of them on the internet; all you need to do is to search for the right one and download it.

2. Create the HTML skeleton. This contains the header codes as well as the background code.

3. To set the background color, you will need to code the background color such that it comes between the tags.

4. Between the tags, create a line where you will code the background color.

5. Start by writing the body element directly on the line you created in step 4. You should have something like this: body{}.

6. Put the background-color property inside this symbol {}, i.e., {background color}, and put a colon in front of the background color, i.e. {background color:}, followed by the color you are using, then close it with a semicolon. You should have something like this: body {background-color: orange; }.

upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.