Example #4: <BODY>...</BODY>
This is the area that the visable. This is where all the formatting and things happen. Things bwtween the <BODY> and </BODY> tags are seen. This is where the text is written, and the formatting is done. There are two examples for this oone to deminstrate some things that I will explain in a bit.. I have added some text and links so you can see some different things. You don't know how to do these yet, but don't worry about that aspect of it yet. What To Look For: In this first, you will be looking for several things. You will be looking at the background color (black), the text color (white), and two other colors that are in the text (red and blue).
The HTML code for the first example:
The only part of this that I really am interested in at this time is the <BODY BGCOLOR=000000 TEXT=FFFFFF LINK=FF0000 VLINK=0000FF>...</BODY> part. Between the <BODY> and </BODY> tags do is define the area where the visable text is located. In between these tags, the text is put, pictures are put, as well as any formatting things such as indents, frames, spaces, whatever. This area is the bulk of the HTML file. Let me explain what is going on for this first example.
This just tells the web browser that the next section is part of teh body, and to fo;llor the instructions (code) accordingly. It is possible to just have the <BODY> and </BODY> tags without the other options. In fact, why don't you take a look at what it is like without the other options by clicking here. I have just removed the BGCOLOR=000000 TEXT=FFFFFF LINK=FF0000 VLINK=0000FF whatever they did. Kinda boring, huh?<BODY>
BGCOLOR=000000
The BGCOLOR tells the browser what color to make the background. It gets the color from the 000000. I will exaplain the how the color works in a little bit.
TEXT=FFFFFF
The TEXT tells the browser what color to make the text when it is displayed. Again this color comes from the FFFFFF, and again, I will explain that in a little bit.
LINK=FF0000
The Link tells the browser what color to make the unvisited links. In this example, this color was red. I will explain the colors in a bit...I promise.
VLINK=0000FF
The VLINK tells the browser what color to make the link after it has been visited (comes from Visted LINK). in this example, that color was blue. Keep reading to find out how the colors are done.
How the color is done
What To Look For: In the second example, you should look for the background (a graphic), the text color (white), and the two colors in the text again (yellow and green).
The HTML code for the second example.Again in this example I want to only look at the <BODY> tag as well as it's elements. The only difference in this one, and the last one is the lack of the BGCOLOR=000000 and the presents of BACKGROUND="../pic/html/backgrnd.jpg". OK, that may not seem like much, but I am sure you noticed the difference right away. The BACKGROUND element allows for a background picture or graphic to be tiled behind the text. There are some cautions that should be thought about when using graphics. I will dedicate a large area to graphics later. The "../pic/html/backgrnd.jpg" just tells the browser where to look for the graphic. This reference to the pic is known as a relative one. Being that it is relative to where it is being referenced from. I could have also done BACKGROUND="http://anduin.eldar.org/~ben/pic/html/backgrng.jpg" It really makes no difference. I will show you some of my directory tree, so you can trace the route of this.
