![]() |
|
The Body Tag in HTML, Free online HTML Tutorial, Learn HTML online for free... |
| Lessons | 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 gray. 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. A discussion of absolute and relative paths will come in a later lesson.
Next >>> Lesson No. 8: HTML Headings
|
|