help newbie with links

janplank

New Member
Hi,

I am new to web design and I am doing it in my spare time. I have registered my domain and bought a web hosting package. I have also written a simple page in HTML and uploaded to the server.

My problem is that I want to create a link to page 2 of my site. For some reason it is not working:(. I am not sure if it is the code or if I have uploaded the file to the wrong directory.

I will be pleased if someone can help me please.:D
 

PixelPusher

Super Moderator
Staff member
A link tag is written like so:
HTML:
<a href="http://www.yourdomain.com/page2.html">Link text</a>

You can use the "target" attribute to determine how you would like the link to open. Using "_blank" will open a blank window and load you page(2) content.
 

craftygeek

New Member
it is also a good idea to use a title tag as it helps usability eg:

HTML:
<a href="http://www.yourdomain.com/page2.html" title="Link Text">Link text</a>
 

janplank

New Member
A link tag is written like so:
HTML:
<a href="http://www.yourdomain.com/page2.html">Link text</a>

You can use the "target" attribute to determine how you would like the link to open. Using "_blank" will open a blank window and load you page(2) content.

why put the domain name like
<a href="http://www.yourdomain.com/page2.html">Link text</a>

instead of

<a href="page2.html">Link text</a>

I got it working. My name didn't point to the right file. :p

Thanks for the input.
 

LouTheDesigner

New Member
why put the domain name like
<a href="http://www.yourdomain.com/page2.html">Link text</a>

instead of

<a href="page2.html">Link text</a>

I got it working. My name didn't point to the right file. :p

Thanks for the input.

You can do it either way. Since we were unaware of your file structure (where the linked file was located in relation to the file linking to it), it made sense to just show how to do it using the domain.

-Lou
 
Top