Tuesday, June 16, 2009

HTML link code tips

In this article you will learn secrets of linking and few HTML link code tips. Also you can find ways (with HTML code samples) to link more efficiently from your site.



Here are questions on which this post will try to answer :

Simple HTML link code with tag <a>

To create simple HTML link use this code:


<a href="http://interestingwebs.blogspot.com">Link to my blog</a>


href attribute - specifies the destination of a link

Text between <a> and </a> tag - is a text that visitor see on page


Improve your PageRank with nofollow attribute

Sample of HTML link code to implement NoFollow attribute :



<a rel="nofollow" href="http://interestingwebs.blogspot.com">Link to my blog</a>

The PageRank of a particular page is roughly based upon the quantity of incoming links as well as the PageRank of the pages providing the incoming links. To learn more about PageRank visit PageRank explained.

PageRank contribution - Pagerank of page on which is incoming link (backlink) is divided by the number of outbound links (links to other pages) on that page, more outbound links on page means lower PageRank contribution to linked page.
We can tell that every page have 100% of vote's right. If incoming link page have one link then linked page get 100% vote's right of that page.
But if incoming link page links to two different pages then every of two linked page will get 50% vote's right (Pagerank contribution) of incoming link page.

NoFollow attribute means that a hyperlink should not influence the link target's Page Ranking.

Example: for page A is better to have incoming link from page B which links only on page A (scenario 1) and get 100% of page B vote's right then from same page B which links on multiple pages and have only 33% of page B vote's right (scenario 2).
If page B have one link to page A and two NoFollow links then page A will get 100% of page's B vote's right (scenario 3).

Share of Google PageRank value of outbound links with NoFollow attribute

You can get better PageRank if you link with NoFollow attribute on other sites, and save your PageRank contribution for pages of your sites and for partner sites.

Like in real life balance is important, if you are to skimpy people will not like you.

My advices is to use NoFollow attribute for:
  • popular sites (like Google, they already have high PR and your link will not make difference )

  • business sites

  • old blogs that have not been updated more than a year

Do not use NoFollow attribute for:
  • your own pages

  • friend and partner pages

  • cool pages

  • blog pages - they need you PR contribution


Using target attribute to keep page open after clicking on link

To open link in a new window you can use attribute :

target="blank"

Sample:

<a target="_blank" href="http://interestingwebs.blogspot.com">Link to my blog</a>

This code open link in a new window, first window remains open.

Why to use target _blank :
  • when visitor click on link to other site, page remain opened so visitor does not leave page

  • so we can tell it keeps users on starting site

  • some sources claim that it decreases bounce rate (visitors stays on site because page remain open and click on other pages of same site)


Why to not use target _blank:
  • it is user-hostile - it should be up to the user to decide where the link should open up: in the same window, in a new window, or in a new tab (see The Top Ten Web Design Mistakes)

  • when new window is opened visitor can't use Back button and they cannot return

  • non experienced user can be confused with new opened windows

  • I was take a quick look on top blogs (tehnorati) and find that in top 10 blogs only 2 blogs using new window (target="_blank")


Link to a location on same page

Demonstration:
Go to beginning of post

Sample code to navigate on same page:

<a name="GoToBegin">Beginning of post</a>


<a href="#GoToBegin">Go to beginning of post</a>


When link "Go to beginning of post" is clicked "Beginning of post" is positioned.

How to make email hyperlink

Sample :

<a href="mailto:blogsrec@gmail.com?Subject=Test">
Send Mail</a>

1 comment:

wisdom said...

Nice tutorial, it also helpful for beginners.