10th Class Computers Science Working with HTML Changing Background Color

Changing Background Color

Category : 10th Class

*  Changing Background Color



The contents of the Web Page are always written inside thetag. The background colour of a web page is changed through the bgcolor attribute which is provided by HTML. The HTML element contains attribute as its characteristics, which generally modify the behaviour of that element. The attributes values are always given in double quotes. Syntax used for background colour attribute is:


<body bgcolor="value">


The value to the bgcolor attribute can be assigned either by specifying the hexadecimal value of the colour or by specifying the name of the colour. A (#) is put before the value, when the colour value is specified the hexadecimal notation. The following table lists some important colours along with their values in hexadecimal notation:

Color                     Hexadecimal Value

Black                      #000000

Red                        #FF0000

Parrot green         #00FF00

Blue                       #0000FF

Yellow                   #FFFF00

Sky blue               #00FFFF

Pink                       #FF00FF

Grey                      #C0C0C0

White                    #FFFFFF

You need to login to perform this action.
You will be redirected in 3 sec spinner