Activating An Image
Okay, this gets a little fancy. In HTML Lesson Day
#4, I showed you how to create a hypertext link. What it did was create blue words on your
page so someone could click on them and then jump to another site. Well, here we're going to set
it up so an image becomes clickable 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 the Buffalo High School HTML
home page using the image above.
Here's the format:
<A HREF="http://www.geocities.com/bisonhtml"><IMG
SRC="anikokosax.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="anikokosax.gif">
See what I did? I added an attribute that denoted that the border should be 0. 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 0 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 this 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.