LET'EM KNOW! BOOKMARK US! LINK TO US! HOME PRIVACY POLICY HELP

Linking To Another Web Page

By Budda May 28, 2008 11:40 PM
Print This Page LinkPrint This Page Email To a Friend LinkEmail This Page Bookmark This Page

Now the Web is all about linking from one page to another, if you have more then one web page, you will most likely want to create links from one page to the next and back again. You can also create links to other peoples web pages.

Now in order to link to another page we will need the anchor tag <a> and its end tag </a> along with its href attribute to create a hypertext link also know as a hyperlink which is basically a link from one HTML or XHTML web page or resource to another or within the same page.

The href attribute stands for hypertext reference which specifies the URL of a hyperlinks target. Now remember the href is an attribute so it will need a value, which can be any valid document URL, absolute or relative. URL is short for Uniform Resource Locator, it's also short for Universal Resource Locator, which is a way of specifying a location of publicly available information on the Internet.

Now when you create a link, the text that is wrapped around by the <a> tag is usually highlighted in blue and underlined to indicate that it is a link, unless the links appearance has been modified by style sheets also known as CSS. We will use our home page codenique.com as our link in the following examples.

There is other types of links like ftp, news, telnet, mailto and so on which I will explain later on.

Now let me show you how to code in a link.

<html>
<head>
<title>Welcome To HTML & XHTML</title>
</head>
<body>

<p>
<a href="http://www.codenique.com">CodeNique</a> serves as a hyperlink that points to the web page http://www.codenique.com
</p>

</body>
</html>

Here is how the above code should look like in your browser.

CodeNique serves as a hyperlink that points to the web page http://www.codenique.com


Now if you want to nest the <a> tag and want your web page to be compliant with the HTML 4 and XHTML standards you should place the <a> tag inside other markup tags, not the other way around. I will show you what I mean in the examples below.

<html>
<head>
<title>Welcome To HTML & XHTML</title>
</head>
<body>

<p>
<b><a href="http://www.codenique.com">This is the correct way</a></b>
</p>

<p>
<a href="http://www.codenique.com"><b>This is the wrong way</b></a>
</p>

</body>
</html>

The first example is correct, and the second one is not.

FIND A JOB

what
job title, keywords
where
city, state, zip
jobs by job search