Hyperlinks, or simply links, are all those underlined words or images that you see in web pages that will take you from one web page to another web page when you click on them. And, making links in HTML is really very simple once you get the hang of it. So let’s just jump right in and make a link to the Internet Public Library.
To start, you need a pair of anchor tags, <a and </a>, which tell the browser that "Hey, here is a the begining and ending of a link." Between the anchor tags you want to put the text that will be your link. In this example, I am have used the words "Internet Public Library":
<a>Internet Public Library </a>
But wait, that’s not all. The web browser doesn’t know what web page you want to link to. So, in order to tell the web browser what page you want to link to, you need to use a hypertext reference attribute, href, as well as a URL for the value. The URL, which stands for Uniformed Resource Locator, is nothing more than the web address that is displayed in the location bar of the web browser. For example, if you look up there right now, the web address for this page here is /youth/kidsweb/tags9.html.
I know, it sounds a bit confusing, but looking at the example might help:
| "URL goes here">
| write some text to identify the link
this will be your link
Still confused? Well, here is the HTML for making a link to the Internet Public Library:
- <title>Learning HTML</title>
- <a href="/">Internet Public Library </a>
Got the hang of it? It is pretty simple once you get the hang of it. Just make sure that the URL is enclosed in quotation marks, or your link won’t take you anywhere.
This resource originally created by Deborah Dunk.
Revised and edited by Michael Galloway in 2005 & in 2006.