Lesson 4:

Attributes in Tags

Attributes are things that go into html tags to make them do something beyond the default style. All attributes are surrounded by quotes.

Some examples of tags containing attributes are:
<hr width="100"> This attribute makes the horizontal line 100 pixels wide.
<font color="#00ff00"> This attribute makes the text color green. We'll go into the hexidecimal color system later.
<font size="48pt">This attribute makes the text size 48. It means the tallest letters are 48 pixels high.

Colors

There are 2 ways to specify colors in a tag.
The first way is to use color names:
You do this by specifying a color name in the color attribute. color="red"

The second way is to use the hexedecimal color system. This system uses a series of six characters (0-9, A-F). Ex. #02f2e8
The first two characters represent the red portion of the color spectrum
The second two represent the green portion of the color spectrum
The third pair represent the blue portion of the color spectrum

#RRGGBB

0 makes a color darker
F makes a color lighter
If colors are mixed in equal amounts they make a shade of grey.
#000000 makes Black.
#FFFFFF makes White.
#FFFF00 makes Yellow
#00FFFF makes Light Blue
Experment With different combinations of colors and see what you get!
Any questions on anything said in this lesson? Visit Sharpened.net to learn what it means!

Go back to Lesson 3 :: Move on to Lesson 5.