Free Webmaster Help Logo
Tutorials Articles Tools Images Directory Ask Newsletter
Part of Gowansnet
*
 

Tutorials
Cookies
ASP
Advanced HTML
Frames & Tables
.htaccess
Rounded Table Corners
Flash 5
FTP
Beginners
Javascript
PHP/MySQL
Site Promotion
Mobile Internet: WML/WAP
Server Side Includes (SSI)
HTML - The Basics
XHTML
Stylesheets
XML
PHP
*

125x125

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

Introduction

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="http://www.webaddress.com/folder/page">
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="mailto:yourname@yourname.com">
Bookmarked Section<a href="#bookmarkname">
Bookmarked Section In Another Page<a href="pagelocation.htm#bookmarkname">


Bookmarks

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 - 2001 David Gowans