Home
Introduction
Text Formatting
The Font Tag
The Body Tag
HTML Headings
Paragraphs
HTML Lists
Adding Comments
HTML Entities
HTML Tables
Relative and Absolute Paths
Adding Images
Adding Links
Text Marquee
Image Marquee
Working with Forms
Adding Meta Information
Next Step...

The <body> Tag



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.



completehtml@gmail.com