Basic HTML Tutorials
Home Tutorials Exercises About Us

Choose a lesson here:
HTML Tags:
**HTML Tag List
Lesson1:Head Tag
Lesson2:Body Tag
Inside Body:
Lesson3:Background Color
Lesson4:Background Image
Text Manipulation:
Lesson5:b,u,i,center,br
Lesson6:hr,ur,li,ol
Lesson7:h1,space,div
Lesson8:pre,font
Lesson9:strike,power
Images:
Lesson10:Inserting Images

 

How to set the background color in html?
Use Bgcolor Tag!
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="blue">
<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.

Created by: JCSG 2014 <_