URL's - What Are They And How To Use Them

A URL (Uniform Resource Locator) is an address for something you can access on the Internet. Usually the address will be a Web page. For example, ‘http://www.sausage.com/whatsnew.htm’ is an URL. Most browsers have the http:// as given, so you could just as well enter ‘www.sausage.com’ However, URL’s don’t have to point to Web pages. For instance, the URL ‘http://www.sausage.com/graphics/logos/sausage_silver_white_type_300x140.jpg’ points to an image.

Special Rules

There is a special Web page name you can use called index.html (or index.htm). This Web page name is the default Web page that browser will display if no Web page is specified in the URL. For instance, if you enter ‘www.sausage.com’ into your browser, you will see sausage software’s home page. What you are actually seeing is http://www.sausage.com/index.htm. Now you are designing your own Web pages, you can take advantage of this fact. The index.html page is your welcome page. It should be used as a jumping off point for all your other Web pages.

Example

When HotDog asks you for a URL, it is asking for the address of some resource on the Internet. This could be a Web page, image or sound. All you have to do is know what the address is and you can link to it.

For example, say you wanted to link to favorite band, ‘They Might Be Giants’. First of all you need to find the address for their WebSite. In the course of your searching you come across a Web page and decide that this is the page you want to link to. Now you must find the URL or address of the Web page. Usually, somewhere near the top of your browser, there is a box displaying the address of the page you are viewing:

Typical Browser showing URL The URL is ‘http://www.tmbg.com/’. Note, the last slash is not necessary but is technically correct. You will notice if you follow any of the links in the site, the address will change. For instance, if you follow ‘melody link’ the URL becomes ‘http://www.tmbg.com/melody/index.html’. An exact break down of the URL is possible. The Web page pointed to by the melody link is called index.html and is stored in the melody directory on their server. Because the filename is index.html, you could just enter the address http://www.tmbg.com/melody/ and you would see the same Web page.

Inserting a Link to Another Web Page.

Now you know the URL of the Web page, inserting a link to it from your own Web page is easy.

  1. On the Insert menu, click ‘Insert HyperText Link’.

  2. Next to the URL box, click the ‘Files’ button.

  3. Enter the URL of the They Might Be Giants WebSite, ‘http://www.tmbg.com’.

  4. Enter the description of the link (i.e., the clickable part) ‘They Might Be Giants’.

The result looks something like this on the visitor’s browser:

Click here to visit the They Might Be Giants Web page.

 TIPS

  • Sometimes you will follow a link to a Web page but will be unable to find the introduction to the whole WebSite. For example, you might have found the download page for a WebSite but are unable to find any links to the introduction page. Most times you can find this page by directly entering obvious URL’s yourself.

Example

You are at the Web page: http://www.dummyname.com/download/downloadpage.html

If you wanted to try and find the welcome page to this site (i.e., the index.html page), try entering the following URL’s into your browser:

In all likelihood, one of the above URL’s would have the information you need.

URL’s in HTML

Now you know what a URL is, how do you insert one in HTML?

The basic HTML syntax for a URL is:

<A HREF="http://www.sausage.com"> Clickable Text </A>

The <A> tag (anchor) sets up the beginning of the URL. The HREF (Hypertext Reference) attribute inside the A tag defines the address of the URL.

Notice how the clickable text is managed? - It is inserted between the <A HREF="&ldots;"> or "Turn Hypertext Link on" and </A> or "Turn Hypertext Link off". Any text you insert between the <A> and </A> tag will become clickable.

In fact if you have a closer look at how images are made clickable, you will see it is just an extension of this principle:

<A HREF="http://www.sausage.com">

<IMG SRC="graphics/pic.jpg">

</A>

Put simply, the image has been placed in the middle of the <A> tag (or has been wrapped by the URL), and is now clickable.