ATTRIBUTES OF THE BODY TAG:

1.  bgcolor:
This attribute changes the default background colour to the colour specified with this attribute bgcolor attribute can be assigned a color name or its equivalent “RGB Hexadecimal Triplet”.

Example 1:
            <body bgcolor=red>
            This is my First HTML Program
            </body>


Example 2:
<body bgcolor=”00FF12”>
This is my First HTML Program
</body>


To select colour with RGB values, set the bgcolor attribute to RRGGBB format. Each of the alphabet in this format can be substituted with a number 0 to 9 or alphabet A to F. 0 represents absent of colour and F represent the maximum value of the color.

2.  text-attribute:
It changes the text colour from its default value (black) to the color specified with its attribute.
Examples:
         <body bgcolor=”FFFF00” text=red>
            This is my First HTML Program
            </body>


3.  background:
This attribute specifies the name of the image file that will be used as the background of the document. The image will be horizontally and vertically tiled if it is not large enough to fill the entire screen Images files with extension gif, jpg, bmp, jpeg, can be displayed.
Example:
<body background=”C:\users\Birla Desktop\visit.jpg”>
This is my First HTML Program

</body>

Post a Comment

0 Comments