H I O X INDIA
FREE ADVANCE HTML Tutorial
 HOME  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Templates 
  :-)  Send Page   :-)   Feedback   :-)   Register   :-)   Links   :-)   Support   :-)
Español Français 中文 Deutsch Portuguese Japanese தமிழ்
 Forums   Hosting   Internet Stats   Easy Calculation   FUN Games 

HTML Basic
Introduction
How To
HTML Tags
html, head, body
Text Manipulation
IMAGES
Special Effects
Using Tables
Forms
Other Topics



ADVANCED HTML
Introduction
Media
Meta Tag
Frame tags
Fieldset
Tooltip
DTD
Image tags
Subscript & Superscript
Bullet styles
Canvas
Other tags
Ask Your Doubts
More about HTML
Feedback





Body Background Color Code


Topic

How to set the background color in html?



Explanation


First let us know what we call as attributes.
If human body is tag, its color can be called its attribute.
Similarly each tag can have its own set of attributes.

Now we will see about the attributes of body tag.
The most used one is "bgcolor". It is used to set the background color.
<body bgcolor="red">
</body>

SO we add the attribute in the opening tag.
There we give the attribute and equate it to the value we want.
"bgcolor="green"". You can set any value as red, blue, orange, yellow, etc......

e.g: Combining all the tags learned so far
<html>
<head>
<title> My Page
</title>
</head>

<body bgcolor="green">
This is my first page </body>
</html>

Test It: Copy the code or type the code in to the textbox shown below and click show.






privacy policy     license     sitemap
© 2004-2010 HIOX INDIA

Other Links