News GoLive Help and Tutorials HTML Help and Tutorials JavaScript Help and Tutorials Links, Files, and Resources Contact and Contribution Info
 
   
HTML Tutorial
HTML Basics : Links [Text]

LINKS - Text

These are the first things you'll want to know about: how to make hyperlinks. Here's an example link, to my website:

Visit my site NOW!!!

Let's take a look at the HTML for that link:

<A HREF="http://www.mattman.net">Visit my site NOW!!!</A>

You already know that HTML 'tags' go before and after whatever you want to affect, so to make some text bold you put <B> before it and </B> after it. The same is true for links. The linking tag is <A>. The HREF part is just telling the browser that the link is a clickable destination, and the code for this will always be the same. Next comes the actual URL you want to link to, inside quote-marks. This does NOT have to be an absolute URL, meaning that it doesn't have to begin with http:// etc. If the page is in the same directory as the one you're linking from, then the filename is sufficient. E.g. if I'm at the www.mattman.net homepage, which is called index.html, to link to the Contact Mattman page (called contform.html), I only need this code:

<A HREF="contform.html">Click here to contact Mattman</A>

After the URL, we close the quote-marks and close the A HREF tag with the usual > symbol, then we have the actual text which we want to be clickable. You can see this easily from the example above. After the clickable text, you must always include the </A> tag. Why? Because if you don't, everything after the text will ALSO be linked to whatever URL you specified! You can understand why this would be the case: you've never "switched off" the link. HTML works by "switching on" a tag then "switching it off" after whatever you want it to affect.

Back to HTML Basics

  
These tutorials were contributed by Matt Ridley. If you have any questions, corrections, or suggestions on how to improve it, you may email him at mattman@mattman.net. Visit his own site at http://www.mattman.net.

Matt currently works for the GoLive Technical Support Center, and regularly shares his knowledge with users of the GoLive Talk List.

Sources: Personal experience.


Back to HTML Tutorials

Design and Content ©1999 WebDawn Multimedia. View our Copyright Notice.
Send Comments and Feedback to the WebMaster.