| The <body> and </body> tag of an HTML web page contains
all the stuff that is displayed in a browser. We can control the
appearance of a web page by using different attributes of the <body>
tag.
Setting Background Color:
The default background color of a web page is white. We can change
the default background color by using the bgcolor
attribute of the <body> tag.
<body bgcolor="gray">
The above HTML code will set the background color to red. You can
either specify the color name or RGB hexa value of the color.. A
list of common colors is available here.
Setting Background image:
You can set the background image of a web page as under:
<body background="logo.jpg">
The background attribute of the <body> tag
specifies the location of the image file to be displayed in the
background of the web page. It takes an absolute or a relative path
of the image file.
|