INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

HTML Crash Course

3 - Links by Javrix
Posted: 10 May 01

***Note on this page that the ; character on the end of the codes is inserted by Tek-Tips and is NOT part of the code.

Quick review:
We know the basic structure of web pages:

<HTML>
<HEAD>
<TITLE>Title</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF" TEXT="000000" LINK="00FF00" VLINK="CCCCCC" ALINK="C0C0C0">
Text text text
</BODY>
</HTML>

In this section we're going to look at links, and ONLY links.
But before we get started, there's a few things I forgot to mention in the other sections.
First, our tags don't need to be in caps.  I do it to look nice and neat, but you can do it anyway you'd like.
<HTML> <HtMl> <html> are all the same.

So, what is a link and how does it work?  
Hyperlinks, or just links, are what make the internet go round.
Let's take a look at how a link is writtin in HTML:

<A HREF="http://www.mypage.com";>This is the link to mypage.com</A>

Ok, let's rip this apart.

The A in the above code means Anchor.  Anchor's are the base for our links.  Anchors are used not only for links, but we'll just focus on the link part for now.
We tell the page we're making an anchor here <A> and we're going to end it here </A> and anything inbetween the two is what the anchor does.

The HREF is the actual code that links us.  HREF actually means Hyper Reference.  So in this case we Hyper Reference to http://www.mypage.com.
Although the quotes aren't required, it's a good practice because you'll soon be using quotes a lot.

So let's take a step back and look at it.

<A (the anchor starts) HREF="http://www.mypage.com";> (this is what the anchor will do, it will reference us to mypage.com) This is the link to mypage.com (this is inbetween the anchor's, so when someone clicks on it, it will reference them to mypage.com) </A> (stops the anchor code)

This is the basis for all links.

Let's leave it at that and move on...

***Remember, Tek-Tips is adding a ; character to each link.
So the code:
<A HREF="http://www.mypage.com";>text</A>
Is correct without the ; at the end of mypage.com

Back to HTML, XHTML & CSS FAQ Index
Back to HTML, XHTML & CSS Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close