Search trough the ArchiVision Directory:

Html link code inside pages of websites

A link inside a web page can be very handy. Like the links you can find in the menu structure of a website and the text of the page itself. To implement links there is some html coding required. Accoarding to each type of link you need to ad some html code. We explain it to you in a simple way so you can implement it directly in to your web pages. As a webmaster adding or changing links on your website will be a peace of cake after reading this post. So here are the type of links that we're going to share with you. Html link codes starts always with an '<a href= ' and ends with a '</a>'.

Text link
This is the most used link method that every webmaster needs to now how to implement in his website pages.

html code

<a href="">Visit our Broken Link Tutorial</a>

Image link
A link attached to an image is sometimes very useful. Most buttons are images with a link attached to it. The user of your website will click on the image to go to another page and browse your website.

html code with all the attributes that can be set by the user

<a href=""><img src="" alt="zzongs logo" style="width:42px;height:42px;border:0;"></a>

In the alt atribute you can describe what's the picture about. Use also a filename that describes the picture like 'zzongs logo.jpg' this helps Google and other search engines to crawl the right information about the picture.

The style atribute is not always necessary but is usefull if you want big pictures to be shown smaller without having to compress them first or if you want to show a border around the picture.

Anchor link, linking within a web page
These links are called 'Anchors' and are very similar to normal links with the difference that a normal link will point to the top of another page and an anchor will point to a place within the same page you already at.

To do this you need to create a set of links, mostly on the top of the page, that points to an anchor inside the page. Then you need to define the anchor itself where it begins in the page.

Html code that points to an anchor

<a href=”#dogs”>Dogs</a>

<a href=”#cats”>Cats</a>

<a href=”#birds”>Birds</a>

Html code of the anchor inside the page

< a name=”dogs”></a>

< a name=”cats”></a>

< a name=”birds”></a>

Note: this code works only for the page you're on. If you want to link to an anchor inside another page you need to use the following html code:

<a href=” in the picture”>Artists</a>

Load page into a new tab
If you want to load the page in a new tab of the browser without closing the page where the link is on than you need to use a target atribute zoals _blank.

Html code that opens the page into a new tab
<a href="" target="_blank">Visit the ArchiVision Directory</a>

Other target attributes that can be used:

_blank - Opens the linked document in a new window or tab, this is the most used attribute.

_self - Opens the linked document in the same window/tab as it was clicked. This is only needed if the page has to be releaded in the browser after clicking the link.

_parent - Opens the linked document in the parent frame.

_top - Opens the linked document in the full body of the window.

framename - Opens the linked document in a named frame.

Redirecting page
A redirecting page is a page that links a page to another page because the original page that was linked to was moved to another place. When this happens than a redirecting page is a good solution that links the landing page to the link with a 'between link' in the form of a directing page. Note that a redirecting page this is a full html document and has to be uploaded to the original spot where the moved html file was first. When clicking the link the browser will send you to the redirecting page and the redirecting page will that sends you to the right page without you even notice it. This way you avoid broken links in your website.

Html code, not that this is an entire full html file.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<title>Redirected To</title>
<meta http-equiv="REFRESH" content="0;url="></HEAD>
This page is rediricted to an other place.

Note that the 0 after the content=" means that you display the redirect page for 0 seconds, you can change that value to more seconds if you want to display the user something that is on this page but this is not necessary in fact the user want to be on that landing page as soon as possible.

CSS style
Most modern websites run css files to manage the layout and the style of the web pages. With this file you can set the properties of text and other things but also links can be styled with it. Links can be in 4 different states that can be styled seperately.

css code snipet

a:link {color:green; background-color:transparent; text-decoration:none}
a:visited {color:pink; background-color:transparent; text-decoration:none}
a:hover {color:red; background-color:transparent; text-decoration:underline}
a:active {color:yellow; background-color:transparent; text-decoration:underline}

Backlinks and innerlinks, SEO and ranking in Google
Google does count how many links their are to a webpage. The most linked webpage will be crawled more often and will likely rank higher than other pages. Their are 2 different types of links in SEO. The first is the most easy to manipulate and are the innerlinks. These are the links inside your website that pointing to another page inside your website. The more you link to a page inside your website, the more important the page is. The second type of links are backlinks. This are links coming from other websites that link to a page from your website. This backlinks are very important for ranking. The more backlinks from different websites the more relevant a page is and Google knows this because the core of their algorithm is based on this. Note that the backlinks need to go about the same subject to give weight to the Google ranking. And a second note: don't mess with this system because you can be penalized to a lower ranking if Google see irregularities.

Related content
Check and repair broken links with broken link checkers

No comments:

Post a Comment