Your First Links
Links represent the heart of Web site design as they allow visitors to jump from one page to another.
As is the case for every page element, a link is defined by a tag:
<a>. This tag encloses the text or object serving as a link activator, but also uses an attribute,
href, the value of which specifies the destination address of the link. So a link pointing to Microsoft's site would be:
<a href="http://www.microsoft.com">Microsoft</a>
Which produces the following result:
Microsoft
You just need to specify the link destination address enclosed by double quotes. There are three ways of writing it:
- If the destination is outside of the site, use an absolute address (of the form http://www.anothersite.com/folder/page.html).

- If the destination resource pointed to is inside your site, a relative address in which the server's name is not specified will suffice:

An address relative to the server (of the form /folder/page.html) will enable the destination page to be located from the server's address (here http://www.mysite.com/folder/page.html wherever the link is placed)
An address relative to the current page (of the form folder/page.html) will enable the destination page to be located from the current page's path. If this link is placed in a page located at
http://www.mysite/com/archives/index.html, it will lead to the page http://www.mysite.com/archives/folder/page.html.
Always double check the names of files you place online as a simple misspelling would generate an error page, which will negatively
impact on your visitors.
Linking an image. In the previous examples, our links led to HTML pages. But there's nothing to stop you choosing an image or any other resource
file as the link destination. Just make sure you specify the right file name in the
href attribute:
<a href="my_image.jpg">My pet's picture</a>
You now know how to place correctly formatted text online with links. But what HTML has to offer goes beyond the few tags
you have seen here. To go further, check out our
HTML workshop.
The next stage is about adding images to your pages!