WebMaster icon, Lecture 2

Basic Linking

Warning: no blanks in file names on ANY system!

Absolute Link to Wilkes Home Page

<a href="http://www.wilkes.edu">Wilkes Home Page</a>

Relative Link to My Other Page 1

<a href="MyOtherPage1.html">My Other Page 1</a>

Link within a page link to description

<a href="#description">link to description</a>

Named anchor description

<a name="description">description</a>


Prev | Next | The 'Old' Way to Make Your Own Home Page


Basic Linking

Warning: no blanks in file names on ANY system!

One major warning involves the use of blanks or other special characters in file names. You should not use blanks, even if your computer allows you to put them in a file name. In fact, you should use an appropriate suffix on each of your files. You should put .html as the suffix on all of your web pages. Use .gif or .jpg as the suffix for image files. If you name your files consistently, you can do linking in a local mode when testing your links. Then when you transfer your files to wilkes1, the links will continue to work. Since you cannot use blanks in a file name, I recommend you use InnerCaps to put several words in a file name. Thus, I use MyOtherPage1.html as a file name containing three words and the appropriate suffix.

Absolute Link to Wilkes Home Page

<a href="http://www.wilkes.edu">Wilkes Home Page</a>

An absolute link uses the a command in the tag (short for anchor). Next is href= which is short for hypertext reference. The reference begins with http:// which is the protocol (HyperText Transport Protocol) the browser uses to connect. Next comes the name of the machine you are connecting with www.wilkes.edu. Then there may be a list of folder (directory) names between slashes ("/"). Finally, there can be an actual file name like MyOtherPage1.html. The text between the tags will be colored and underlined in most browsers. The final tag is </a> which closes the container.

Relative Link to My Other Page 1

<a href="MyOtherPage1.html">My Other Page 1</a>

A relative link is to another page (file) in the same folder (directory) as the current file. The html is the same except that the href reference is just a file name (with appropriate suffix). This type of link will work in a local mode (disconnected from the net).

Link within a page link to description

<a href="#description">link to description</a>

You can create a small table of contents at the top of a page with a link within a page. This time the href reference is a number sign (#) followed by a word. This word (description) points to a named anchor somewhere else in the same file.

Named anchor description

<a name="description">description</a>

The named anchor is a location within a file. When a user clicks on a link to this name, the browser searches for the name="description" anchor. This named anchor is brought to the top of the browser window.

When a user moves the cursor on top of a link, Netscape displays the link on the bottom left of the window. If you click and hold the button down on a link, Netscape will bring up a menu which will let you choose to:

Open this link
Copy this Link Location
Add Bookmark for this Link
New Window with this Link
Save this Link as...


Prev | Next | The 'Old' Way to Make Your Own Home Page


'The WebMaster Speaks....' 2-6

Webmaster Lectures
Welcome to a series of lectures on the World Wide Web
Home | Lectures overview | Lecture 1 | Lecture 2 | Lecture 3 | Lecture 4 | Lecture 5 | Lecture 6 | Lecture 7 | Lecture 8



Membership

Login





Last update: Monday, July 10, 2000 at 10:28:32 PM.
Go to John Koch's home page or send him a message.