Site hosted by Angelfire.com: Build your free website today!
 

html links

how do i link to another page

use a html hyper reference like this
<a href="nextpage.html">click here</a>
(this is called a relative url)
so a link to nextpage.html will look like this on your page click here

how do i link to another website

use a html hyper reference like the one above but use the other websites full address
<a href="http://www.yahoo.com">yahoo</a>
(this is called an absolute url)
so a link to yahoo will look like this on your page yahoo

how do i use a picture as a link

to use an image as a link we just wrap the hyperlink around the image tag like so..
<a href="index.html"><img src="picture.gif"></a>
Try it html tutorial home

in the example above the image has a border around it, to remove the border, all that we need to do is add border=0 to the image tag

example
<a href="index.html"><img src="picture.gif" border=0></a>

how do i link to another website in a new window

use target="_blank" in your html hyper reference

working example
<a href="http://www.yahoo.com" target="_blank">yahoo</a>

how can i include an email link

to create an email link the mailto: attribute of the <a> tag is used
<a href="mailto:someone@$nailmail.com">email</a>
a subject can also be included using the ?subject attribute
<a href="mailto:someone@$nailmail.com?subject=free chocolate">email</a>

how do i let users download files

it's very simple to allow users to download files from the web
a normal hyperlink is used, but instead of linking to a .html file the link points to the file to be downloaded
in this example the link points at an .jpg image

<a href="spaceman.jpg">spaceman.jpg</a>
try it spaceman.jpg (3KB)

in this next example the link points to a .mid (midi) file
<a href="soundfile.mid">soundfile.mid</a>
try it ourhouse.mid (36KB)

in the same way .txt, .zip, .mp3 or any other files can be made available for download

how can i link to a different part of the same page

to create a link to a different part of the same page the name attribute of the <a> tag is used
in this example the word 'top' is used because it is descriptive since our link will be to the top of this page, but any word will do
the name anchor below is placed directly after the body tag
<a name="top"></a>
to link to the tag a normal hyperlink is used with #top added.
<a href="#top">top of page</a>

« back | html tutorial | next »


home
html tutorial css tutorial javascript webmaster articles link exchange

html tutorial

make money
from your website