I know I said we would learn tables next, but I felt a need to talk about
Addresses
and
Background Image's
. I promise we'll do tables next!
ADDRESSES
You learned in
Lesson 3
about
Image
and
Link
tags and how they asked for an
Address
inside the quote marks. An
Address
is the location of a file, either on the internet, or in your computer. Lets
talk about the computer first. On my hard drive (which is my "C" drive and is
referred to as
C:
), I have a folder called
My Documents
, inside that folder I have a folder called
WebPages
, Inside the WebPages folder I keep separate folders for each one of my web
pages. One of these folders is called
webhelp
, inside that folder I keep all of the
.html
files for these lessons and any other files that go with them. So the
Address
to this page on my computer is:
C:\My Documents\WebPages\lessons\less2.html
NOTE:
the direction of the slant of the slash is different than the one you use for
the internet!
Now lets talk about the internet. The
Address
to this page on the internet is:
http://www.htmljunction.com/lessons/less2.html
The
http://
stands for
H
yper
T
ext
T
ransfer
P
rotocol (For a more detailed explaination check out one of the links on the Resources page), It is basicaly saying to look on the Internet for the
following directory. On the internet somewhere is a directory called (for ease
of explaining)
www.htmljunction.com
and is known as the
Root
or
Top
directory. Inside that directory I have one called
lessons
inside that directory is where I keep the file for this page!
NOTE:
A
Folder
and
Directory
are the
same thing
! On the computer it is referred to as a
Folder
and on the Internet as a
Directory
On the Internet the Address can be shortened, If the file is in a different
directory, the address can be shortened to:
/images/bye[1].gif
If I'm placing an image on a page and both the html and image files are in the
same directory then it can be shortened to just this:
bye[1].gif
Remember
if the page or image is not on your website the
whole
address must be included. Including the
http://
NOTE:
You
cannot
use an address for your computer on the Internet and vice versa
BACKGROUND
IMAGES
Now that you know about addresses and how to place images and links, and you
know about the body tag, you can now use an image as a background!
Using the body tag from the
Test Page
we will insert the command:
background=""
, so that it looks like this:
<body background="bye(1).gif" bgcolor="#ffffff" text="#000000"
link="#0000ff" vlink="#800080" alink="#ff0000">
What this command is saying is: Use the image located at the address inside the
" "
quote marks as a background on this page.
There are a few things to note here. One being the address I used for the
image, the image is in the same directory as the html file so I shortened it.
If you are having problems, use the whole address. The second thing to note is
that I left in the
bgcolor=""
command. That is so the bgcolor command will take over if you have problems
loading the image. The last thing to note here is when you use an image for a
background it will
tile
it, like this
Annoying Background
, of course you probably wouldnt use that background but you can see what
tiling does!
There is another command that you can put in the body tag that is kinda cool
and thats the
bgproperties="fixed"
command, that will give you a fixed background so that it will not scroll with
the rest of the page. I am told that command only works with Internet Explorer
and not with Netscape.
NOTE:
The commands do not have to be in any particular order, just make sure the
word
body
is first in the tag, and that the commands are separated by
spaces.(this is true for all tags)
Ok, now that thats done with, I promise we will look at
Tables
next.