Tuesday, February 24, 2009

Basic Of HTML & XHTML Lesson 6

Creating Links

Creating standalone Web pages may seem simple until you attempt to link them together in a logical order. The link structure has to make sense to both the user and the developer.

After completing this lesson, you should be able to:

Describe the fundamentals of the link tag
Construct HTML pages that have the ability to link back and forth
Determine where and how possible errors can occur in your link code



To create a link in HTML, you need two things:

The name of the file (or the URL of the file) to which you want to link
The text that will serve as the hot spot — that is, the text that will be highlighted in the browser, which your readers can then select to follow the link

Only the text that serves as the link is actually visible on your page. When your readers click on the link, the browser loads the URL associated with the link.



The Link Tag

To create a link in an HTML page, you use the HTML link tag .... The tag often is called an anchor tag because it also can be used to create anchors for links. The most common use of the link tag, however, is to create links to other pages.






























If your browser can't find the file when you click on the link, make sure that your upper- and lowercase names match, and both files are in the same directory. Remember to close your link, using the tag, at the end of the text that serves as the link. Also, make sure that you have quotation marks at the end of the filename and both quotation marks are ordinary straight quotes.

All these things can confuse the browser and prevent it from finding the file or displaying the link properly.








No comments:

Post a Comment