Beginning HTML

Links

All Internet users utilize hyperlinks to navigate sites. These have made the Internet popular with people with little experience of computers, as a simple point and click interface seems less foreign to people than the command line interfaces of old. In order to include links on your webpages, you'll need to make use of the a (or anchor) tag. The a tag works in conjunction with the href parameter, which tells the browser where the link is pointing to. The text that you surround the a tags with will act as the visible hyperlink. So to produce this sentence:

Check out this site!

We'd have to use this code:

<a href="http://www.developerfusion.com">Check out this site!</a>

Notice that I've used http:// in front of the address. This is necessary and the link won't work without it.

Internal Links

If you wish to link pages together on your site, then it is unnecessary to specify the full URL. In fact, it's slower to do this. A better way is to specify the page's address relative to the current page. For example, if we want a link from index.htm to a page called aboutme.htm which is in the same folder as index.htm then we could use this code:

<a href="aboutme.htm">All about me.</a>

This also means that you wouldn't have to change all of your link tags if you decided to host your pages somewhere else.

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There's no test like production” - Anon