Nofollow external or advertising links

How to block spiders from following specific links or links from a page by using nofollow tag?
Nofollow tags are useful in various aspects. This tag helps in preventing robots from crawling of pages or links.

Blocking the spiders from crawl of contents can be accompanied by the use Robots exclusion method. For preventing the crawl of partner advertisement links, ‘nofollow’ tag can be used. Google who always recommends webmasters to put nofollow for paid links.

An example of this tag is given below

For text link

<a href=”#” rel="nofollow" title=”ads”>OtherSite</a>

For image link

<a href=”#” rel="nofollow" ><img src=”#” title=”ads”></a>