Anchors and links. A HREF HTML tags. How to make connections from one web page to another

Links are like the flow lines in the internet world. Links are one of the more important aspects when you make your own web site. Without links in your web site, you would consider your web site as dead. No way to move from one page to another page saves if your visitor knows the exact URL address to find the web page.

How you link your pages from your main index page right down to each page is known as your as web site structure. The ideal way is like the shape of a pyramid starting from the main index and from that moving out to each topic and from each topic move out to subtopics and so on and so forth. The pyramid style is best as it helps to order the information into sections for easier navigation of your topics. However in a blog style web site where postings are done chronologically, some structure can be imparted to it by the use of category and tags.


However there are also times when you attempt to structure your web site, you find a subtopic would into more than one main topic, and as such you could cross reference from each related topic. And to further complicated the structure sometime you can consider to link to any web page based on the topic of the article at hand. This is ok, so long as you know that page which you created remains in existence. Thus for myself, once a web page is created, I will try as far best as I can to never delete that page because you never know a web page somewhere in your web site might reference to it. In addition, external sites may also reference directly to such page and thus it is always a good idea that once a web page is created it should never be deleted.

The creation of a link is simple and it goes:

<a href=”xxxx”>Link explanation</a>

Where xxxx is the URL which is referenced.

It can be absolute, ie the complete URL eg http://www.etc.com/something.html

Or it can be relative, ie just the web page URL eg something.html

If the web page is stored in a subfolder, include the folder when using relative referencing eg subfolder/something.html

When using relative referencing which points to a file in some other folder, one must be very careful to know when to include the subfolder and when to use the double period to refer to a folder prior to the current one. If the links seem to break and it takes too long to figure out the relative position, then stick back to using full URL which never goes wrong (unless you made a typo. Watch out! Blank spaces can throw your link reference askew!).

There are more to just straight linking. The normal link would open the connecting link in the same window of your browser. In case of a link taking the visitor away from your web site, you may consider opening the external link onto a new window. So that they can still easily refer or return to your web site after they visited the link which you introduced to your visitor. To do that include the element target=”_blank” as per below example:

<a href=”http://www.goingsomewhere.com” target=”_blank”>Going Somewhere</a>

You can also create a link anchor within your web page so that the visitor could jump straight to the point of your article within your web page. This is useful if your article is exceedingly long and you want to provide the visitor for a way to jump to a section within the page they are in.
To make it work, you will need to make an anchor within the web page. Then create a link to jump to that anchor.

To make the anchor in your web page:

<a name=”anchorname”>Anchor Name</a>

And to link to it, you make the link thus:

<a href=”#anchorname”>to the Anchor Name</a>

To link to an anchor located in another web page you use:

<a href=”http://www.website.com/somewebpage.html#anchorname”>to the Anchor Name in some web page</a>

You can also make the link to your email address so that when people click on it, their email program will create a new email letter addressed to your email address. Though it is not advisable to do so due to spambot harvester scavenging for email address like yours to add to their database, and before long your email account would be inundated with spam. A form would be the preferred method if you want visitors to contact you. To create a link to your email address you would code the HTML as:

<a href=”mailto:youremail@yourdomain.com”>your name or something</a>

That’s the basics of creating links, so happy linking!

More related HTML tutorials

Related Posts Plugin for WordPress, Blogger...



Leave a Reply

Blue Captcha Image
Refresh

*

Google  Site Search for JanLeow.com


Bookmark and Share

Enter your email address:

RSS Delivered by FeedBurner