Activating An Image
OK, this gets a little fancy. Last Primer, I showed you how to
create a hypertext link. What it did was create blue words on
your page that someone could click on and then jump to another
site. Well, here we're going to set it up so an image becomes
click-able, or "active". The viewer would click on the image, instead of on blue words, to
make the hypertext link. I'll make a link to my
home page using the image above.
Here's the format:
<A HREF="http://www.htmlgoodies.com"><IMG
SRC="homepage.gif"></A>
Look at it again. See what happened? I placed an
image flag where I would normally have placed words. Here's what you
get with that format. Lay your pointer on the image, but don't
click. You'll see the entire image is active:

Neat, huh? But what's with that new border around the image?
That's what happens when you activate an image. It attempts
to turn blue, or whatever color the page is set to,
like the wording it's replacing, so it places
what's known as a "border" around the image. Some people like it.
I don't, and I know how to get rid of it.
To make the border disappear, you again turn to a trusty attribute, a command inside
of a command.
Here's the format:
<IMG BORDER="0" SRC="homepage.gif">
See what I did? I added an
attribute that denoted that the border
should be zero. You can go the other way too if you'd like.
Make it BORDER="55" if you want. It'll just make a huge border.
Note that the number zero is in quotes. It is an attribute after all.
Here's what you get using BORDER="0":

Again, lay your pointer on the image without clicking.
You'll see that it is active but doesn't carry that annoying blue border.
And that brings us to a close. Tomorrow you'll deal almost
exclusively with attributes in order to
manipulate your images. You'll truly impress your friends with
this one.
On to Primer
#6
Back to the HTML Goodies
Home Page
[Placing An Image On Your Page]
[Here's What's Happening]
[Image
Formats][Where Do I Get My
Images]
[Activating An Image]