HTML Lesson 5

Goto Lesson:

Lesson 1
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Lesson 7
Lesson 8
Lesson 9
Lesson 10
Lesson 11
There are many options for the body command all of which apply to the entire page. Try typing in the example below and then save it as a .html and view the results. an explanation of each option will follow the example.

<html>
<head>
<title>Example of body</title>
</head>
<body bgcolor="#000000" text="#ffffff" link="#bb0000" alink="#dd0000" vlink="#660000" marginheight="3" marginwidth="3" leftmargin="5" topmargin="7" bottommargin="6" rightmargin="3">
This page has a black background with <a href="#">red links</a> and different sized margins.
</body>
</html>


This page now has a very complicated body tag, which we will examine option by option. the first option bgcolor sets the background color of the page, in this example we made it black. the text option sets the default text color for the page (note: this can be changed throughout the page with a font command), which is set to white. link sets the link color (red), alink sets the active link color (a link that is clicked on, ours is a different shade of red), and vlink changes the color of already visited links (ours is a different shade of red). The margin options are not used as often but the top and left margin settings are needed every so often. there are a couple more body tags that you will learn when we reach images and multimedia later in the tutorial. Now lets move on to the next lesson so you can learn how to use links.