Saturday 4 November 2017

Setting Background for a Web page

Setting Background for a Web page

We can make our web page attractive by adding an image in the background or by giving a color to the background.

Attribute are extra bits of information that appear inside tag.

The BGCOLOR Attribute

To add a color to the background of a Web page the BGCOLOR attribute is used. There are predefined colours names that can be assigned to the bgcolor attribute in an HTML document. They are Black, Red, Gray, Blue, Olive, Navy etc.

BGCOLOR Attribute can be assigned by hexadecimal triplet. A hexadecimal triplet is a combination of three colours, namely Red, Green and Blue. In th hexadecimal triplet, there are six digits; the first two digits represent red, the next two green and last two blue, preceded by a hash (#) symbol.

For example

<BODY BGCOLOR = "BLUE">

THIS IS MY FIRST WEB PAGE.
</BODY>

Or

<BODY BGCOLOR = "#1D36F6">

THIS IS MY FIRST WEB PAGE.
</BODY>


Few Hexadecimal Values

Black           #000000
White           #FFFFFF
Red              #FF0000
Green           #00FF00
Blue              #0000FF
Yellow           #FFFF00
Cyan             #00FFFF
Magenta          #FF00FF


0 comments:

Post a Comment

Good Morning Beautiful

Do you know????

Do you know????
/