so I want to add the nofollow tag to some links. I think I can achieve this with some css code maybe. I find a snippet like this: a[rel~="tag"]::after { content: url(http://www.technorati.com/favicon.ico); } Let's say I have a div like: <div id="sidebar"> <a href="http://affiliate.com">nofollow link</a> </div> rather than go in and hardcode a rel="nofollow" to all the sidebar links, I want to just add it in there to all sidebar links using css. Can I bastardized the snippet above to do some kind of 'a.sidebar' style to add the nofollow? thx!
That would be a valueless approach. The rel="nofollow" is an instruction to the search bots. But the bots don't apply css, so the generated content would not be seen by the bots. The same applies to using javascript to add the attribute. cheers, gary
Because search bots don't apply css or any client-side scripting, you would have to do something on the server side - like using PHP to put a rel="nofollow" into your sidebar links.