ptg16476052
Workshop 119
6
Q Can I put any URL in a link?
A You bet. If you can get to a URL using your browser, you can put that URL in a
link. Note, however, that some browsers support URLs that others don’t. For exam-
ple, Lynx is really good with mailto URLs (URLs that enable you to send elec-
tronic mail to a person’s email address). When you select a mailto URL in Lynx, it
prompts you for a subject and the body of the message. When you’re done, it sends
the mail.
Q Can I use images as links?
A Yup, in more ways than one, actually. You’ll learn how to use images as links
and define multiple links within one image using image maps in Lesson 9, “Using
Images on Your Web Pages.”
Q My links aren’t pointing to my anchors. When I follow a link, I’m always
dropped at the top of the page rather than at the anchor. What’s going on
here?
A Are you specifying the anchor name in the link after the hash sign the same way
that it appears in the anchor itself, with all the uppercase and lowercase letters iden-
tical? Anchors are case sensitive, so if your browser can’t find an anchor name with
an exact match, the browser might try to select something else in the page that’s
closer. This is dependent on browser behavior, of course, but if your links and
anchors aren’t working, the problem usually is that your anchor names and your
anchors don’t match. Also, remember that anchor names don’t contain hash signs—
only the links to them do.
Q Is there any way to indicate a subject in a mailto URL?
A If you include ?subject=Your%20subject in the mailto URL, it will work with
most email clients. Here’s what the whole link looks like :
Send email
Quiz
- What two things do you need to create a link in HTML?
- What’s a relative pathname? Why is it advantageous to use one?
- What’s an absolute pathname?
- What’s an anchor, and what is it used for?
- Besides HTTP (web page) URLs, what other kinds are there?