Q
My links aren’t being
highlighted in blue or purple at all. They’re still just plain text.
A
Is the filename
in a name attribute rather than in an href? Did you remembers to close the
quotation marks around the filename to which you’re linking? Both of these
errors can prevent links from showing up as links.
Q
I put a URL into
a link, and it shows up as highlighted in my browser, but when I click it, the
browser says “unable to access page.” If it can’t find the page, why did it
highlight the text?
A
The browser
highlights text within a link tag whether or not the link is valid. In fact, you don’t even need to be
online for links to show up as highlighted links, although you can’t get to
them. The only way you can tell whether a link is valid is to select it and try
to view the page to which the link points.
As to why the
browser couldn’t find the page you linked to –make sure that you’re connected
to the network and that you entered the URL into the link correctly. Also
verify that you have both opening and closing quotation marks around the
file-name, and that those quotation marks are straight quotes. If your browser
prints link destinations in the status bar when you move the mouse cursor over
a link, watch that status bar and see whether the URL that appears is actually
the URL you want.
Finally, try
opening the URL directly in your browser and see whether that solution works.
If directly opening the link doesn’t work either, there might be several
reactions why. The following are two
common possibilities:
·
The server is overloaded or is not on the
internet.
Machines go down, as do network connections.
If a particular URL doesn’t work for you, perhaps something is wrong with the
ma line or the network. Or maybe the site is popular, and too many people are
trying to access it at once. Try an later. If you know the people who run the
server, you can try sending them electronic mail or calling them.
·
The RUL itself is bad.
Sometimes URLs become invalid. because a URL
is a form of absolute pathname, if the file to which it refers moves around, or if a machine or directory
name gets changed, the URL won’t be valid anymore. Try contacting the person or
site you got the URL from in the first place. see whether that person has a
more recent link.
Q
Can I put any URL
in a link?
A
Yup, bet. If you
can get to a URL using your browser, you can put that URL in a link. note,
browser, that some browsers support URLs that others don’t. for example, lynx
is really good with mailto URLs 9URLs that enable you to send electronic mail
to a person’s email address ). When you select a mailto URL in lynx, it prompts
you for a subjects and the body of the message. When you’re done, it sends the
mail!.
Q
My links aren’t
pointing to my anchors, when I follow a link, I’m always dropped at the top of
the paper 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, withal the uppercase and lowercase letters
identical? 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:
< href = "mailto: someone @example. com? subject = Your %20 subject"> send email </a>
QUIZ
QUIZ
1. What two
things do you need to create a link in HTML?
2. What’s a
relative path name? Why is it advantageous to use them?
3. What’s an
absolute pathname?
4. What’s an anchor
and what is it used for?
5. Besides HTTP
(web pages) RULs, what other kinds are there?
QUIZ ANSWERS
1.
To create a link HTML, you need the name or URL
of the file or page to which you want to link, and the text that your readers
can select to follow the link.
2.
A relative pathname points to a file, based on
the location that’s relative to the current file. Relative pathnames are
portable, meaning that if you move your files elsewhere on a disk or rename a
directory, the links require little or no modification.
3.
An absolute pathname points to a page by
starting at the top level of a directory hierarchy and working downward through
all intervening directories to reach the file.
4.
An anchor marks a place that you can link to
inside a web document. A link on the same page or no another page can then jump
to that specific location instead of the top of the page.
5.
Other types of URLs are FTP URLs (which point to
files on FTP servers); file URLs (which point to a file contained on a local
disk); mailto URLs (which are used to are and electronic mail); and use net
URLs (which point to newsgroups or specific news articles in a newsgroup).
EXERCISES
1.
Remember the list of topics that you created
yesterday in the first exercise? Create a link to the page you created in yesterday’s
second exercise (the page that described one of the topics in more detail).
2.
Now, open the page that you created in
yesterday’s second exercise, and create a link back to the first page. Also,
find some pages on the World Wide Web that discuss the same topic and crate
links to those pages as well. Good luck!
No comments:
Post a Comment