Webdev Lesson3
Webdev Lesson3
Center Works!!!
Body attribute
♦ bgcolor="color"
♦ This changes the background color of your
page. You can set this to any color you
would like to use. Just replace color above
with a color name or hex code.
♦ <BODY bgcolor="green">
Or you could use the hex code for green:
♦ <BODY bgcolor="#008000">
Table of color
Color Name HEX Code
black #000000
white #FFFFFF
red #FF0000
blue #0000FF
green #008000
yellow #FFFF00
orange #FFA500
violet #EE82EE
purple #800080
Table of color (cont)
Color Name HEX Code
pink #FFC0CB
silver #C0C0C0
gold #FFD700
gray #808080
aqua #00FFFF
skyblue #87CEEB
lightblue #ADD8E6
fuchsia #FF00FF
khaki #F0E68C
Body attribute (cont)
♦ text="color"
This changes the default text color the browser
will display on your page. You can set this to any
color you would like to use. Just replace color
above with a color name or hex code.
♦ Using a color name:
<BODY text="red">
♦ Or using a hex code:
<BODY text="#FF0000">
Body attribute (cont)
♦ link="color"
This changes the color of all of the non-
visited links on your page. You can set this
to any color you would like to use. Just
replace color above with a color name or
hex code.
♦ <BODY link="red">
Or using the hex code:
♦ <BODY link="#FF0000">
Body attribute (cont)
♦ alink="color"
This changes the color of an active link on your
page, which is a link that has just been clicked on
by a user's mouse. You can set this to any color
you would like to use. Just replace color above
with a color name or hex code.
♦ vlink="color"
This changes the color of a visited link on your
page. You can set this to any color you would like
to use. Just replace color above with a color name
or hex code.
♦ <BODY link="blue" alink="blue" vlink="violet">
Body attribute (cont)
♦ background="image.gif"
This adds a background image to your page. If you
use this attribute, the background image will take
the place of any background color you may have
specified. If you don't use a background image, the
browser will use your background color or its
default background color.
♦ <BODY background="image2.gif">
♦ <BODY background="next.jpg">
Body attribute (cont)
Body tag with all attribute: