How to write the nofollow attribute

A question came up from one of the owners of the Mastering PageRank video concerning the way I wrote the nofollow attribute. There is a general issue here that should be answered, so I’ll do so here.

The way a browser or a spider processes HTML will create an internal data structure that has all the information from the page, but the order of attributes will NOT be preserved, nor even recognized. So, as an example, writing an <a> tag with the href first and the rel="nofollow" second is no different than giving the attributes in the other order.

In fact, this is required by the HTML and XML specifications: attribute order is not significant.

The way I usually write nofollow links is to place it as the first attribute, like so: <a rel="nofollow" href=… because this allows me to easily find it in the source when checking my pages for errors. But that’s just me.

Speak Your Mind

*