HTML Body Tag

The HTML body tag represents the area inside the website page in which the text or graphics can be displayed. The HTML body tag acts as a container for other HTML tags.

HTML Body tag can contain attributes, Attributes are used to provide some additional information to the tags, so that HTML tags can work better.

Attributes Description
Bgcolor*Bgcolor stands for background color. It is used to change the document's background color. Color can be given in any one of the following formats: bgcolor="Red" or bgcolor="#f1f1f1".
Text*Use to set the default foreground color of the document i.e. text color
Background*Background attribute specifies a background picture. The picture is tiled behind the text on the page.
Link*Specify the Hyperlink color
Alink*Change the color of active link
Vlink*Change the visited hyperlink color
Body attribute: bgcolor
<body bgcolor="lightgreen">
<body bgcolor="#55ff55">
Type the color name, color code to check valid color output
Body attribute: text
<body text="white">

Body attribute: background

<body background="image.jpg">

Some sample background images, download it and try to apply on body background.

Related Topic: