Free Webmaster Help Logo
Tutorials Articles Tools Images Directory Ask Newsletter

Advanced HTML
Frames & Tables
Rounded Table Corners
Flash 5
Site Promotion
Mobile Internet: WML/WAP
Server Side Includes (SSI)
HTML - The Basics


Related Links
More HTML - The Basics Sites

Sitemap | Contact | Link To Us | Advertise
Report A Problem

HTML - The Basics Tutorial
Part 4 - Hyperlinks and Bookmarks


You should know how what a hyperlink is and what it is used for. If you do not, a hyperlink is a piece of text you click to be taken to another page. A bookmark is a way of bookmarking a point on your page so that you can hyperlink to it.

The <a> Tag

The <a> tag is used when creating hyperlinks and bookmarks. It stands for anchor. The functions are explained more fully below.

<a href>

To create a hyperlink you need to use the href variable of the <a> tag. Href stands for Hyperlink REFerence. To make a piece of text or an image into a hyperlink you contain it in:

<a href="pageurlhere">Text Goes In Here</a>

Hyperlinks can specify several things:

FunctionExample Code
Web Page or Site<a href="">
Local Page<a href="pagename.html">
Local Page In A Folder Level Below<a href="foldername/pagename.html">
Local Page In A Folder Level Above<a href="../pagename.html">
Open E-mail Program With E-mail Addressed<a href="">
Bookmarked Section<a href="#bookmarkname">
Bookmarked Section In Another Page<a href="pagelocation.htm#bookmarkname">


Bookmarks on a page are very easy to make as they also use the <a> tag. Instead of changing the href variable you use the name variable. For example:

<a name="top">The First Text In The Page</a>

Will create a bookmark called top in the text which the tag surrounds. An image can also be contained in this tag. You can then link to this using a standard hyperlink:

<a href="#top">Back To Top</a>

You can name bookmarks anything you like. Bookmarks are very useful on pages which are very long as they can be used to quickly go to another part of the page.
Part 5

In the final part of this tutorial I will show you how to add images to your page and how to set background colors and images.

© 1999 - 2019