8.17.2010

So much for standards - small signs

Standards based HTML <img> tags generally have a minimum of two components, a src="http://some.url" part and an alt="some text" part.  As far as I can tell, there isn't a web browser in the world that cares which comes first, the src or the alt. It works fine either way.

It just so happens that I learned to use the HTML <img> tag putting the src= part first and the alt= part last, and that's the way I've done it ever sense out of habit.  That is the way I've done it unquestioningly until recently while working with the Google Blogger post editor, which is built to check user supplied HTML.  Also, it seems, the Blogger post editor was built to re-write user input HTML for no obvious reason.

The Google Blogger post editor re-writes the sequence of the <img> tag components so that the alt= part is first.  When I input <img src="http://some.url" alt="some text" /> to the Google Blogger post editor, it changes it to read <img alt="some text" src="http://some.url" />. Every time.

My current mindset is that Google is the benchmark for how things ought to be done, and my pragmatic philosophy is to give a huge, powerful, and impersonal bureaucracy (read Google) exactly what it want in the way it wants it.  Accordingly, I shifted my habit and reversed the <img> elements sequence when writing HTML.

Then I went to post on a Wordpress blog, and the Wordpress post editor did precisely the same thing as the Google Blogger post editor, except in reverse. Wordpress re-wrote my <img alt="some text" src="http://some.url" /> to read <img src="http://some.url" alt="some text" />.

The only effect this has for me is to re-enforce the observation that the sequence doesn't make any difference.

But, if it doesn't make any difference, why do Blogger and Wordpress re-write this code?  Moreso, why do they do it in opposite directions? I'm sure there's a compelling reason somewhere, but I'm not going to put any time into finding it.

The important point for internet marketers and search optimizers is to use the <img> alt tag.  Forget about the sequence.

No comments: