Changing background color

Changing background color

Changing background color: To change the background color of the page, we can use BGCOLOR attribute in <body> tag. BGCOLOR stands for background color and it's value can be any of the preset colors.
Syntax is : 

<body BGCOLOR=colorname> content</body>
Example is:


We can also use rgb factors to describe the color as:

It will give the output as shown in the image below:



Watch Video:



Now you are familiar with how to change background color of the page using BGCOLOR attribute in body tag in HTML. Now in the next chapter we will learn movement of text. Click on the next button:


Comments