HTML Tutorials
Create HTML Links
Create hyperlink
The syntax of creating a text link is:
<a href="url">Displaying Text</a>
<a> - an anchor tag. It also accepts title and target
title="" - this is the achnor text, the text that appears when you position the mouse over the link
target="" - this shows the browser where the link will be opened. e.g. target="_blank" - the URL will be opened in a new window.
It accepts the following atributes:
_blank
_parent
_seft
_top
Sample:
<a href="http://www.nixenmaster.co.uk" target="_blank" title="Web Design and Development" >www.nixenmaster.co.uk</a>
it is equivalent to
www.nixenmaster.co.uk
The name atribute
The name of the anchor can be any text. The anchor text is displayed like a normal text.
<a name="sample">Some Sample Text</a>
You can do a link to this anchor using the # sign anywhere of the document:
<a href="#sample">Go to the Sample</a>
You can acccess it trought a full link path, using the file name as well.
<a href="filename.html#sample">Go to the Sample</a>
Create image Link
The Syntax is
<a href="http://www.nmdir.co.uk" target="_blank" >
<img src="path_to_the_image" border="0" width="200" height="100" alt="Alternate Text" />
</a>
The way to do a link over a text or image is the same. The Link tag is <a></a> and between those <a> just place your text or image tag.
Back
