Saturday, 5 February 2011

Real-life lesson: Adhering to W3C standards is important

If I inherit another designer's website (this occurs frequently at the small business end and I've said enough about that elsewhere) I usually advise the client that time needs to be spent bringing the code up to W3C (or Worldwide web consortium) standards.  This is always quite a hard sell as the benefits are not always apparent to the client.  We know Search Engines will favour a standards-based site over a non-standard site; all other factors being equal - but that's reasonably low in the ranking factors - and we know that over time non-standard sites fail to display properly and need to be addressed at "some point".  But it's a hard sell when times are hard and each "buck" has to go to the biggest "bang".

Well, I was performing some changes today for a client whose site I originally inherited but have not worked on for about 4 months.  Being a large site however, and client cash having to go where it is needed most - I had not validated every single page in times past.  No trouble: everything displayed fine and pages were turning up in search results.

Lesson learned.  Just reviewing the site before doing my amends today I noticed some of the deeper pages had lost their formatting on the side menu.  This was only visible in Internet Explorer - a browser I have long-since abandoned in favour of Firefox - but it still needed addressing.

And I cast about the CSS first - nothing.  I compared other similar CSS in other sites. Nothing.  I checked the code between pages that were working and the pages that weren't.  Nothing obvious.

So I ran a standards check. 
I use CSE HTML Validator (no, this isn't an affiliate link) and ran it across the HTML.  "Ping!" "Ping!" "Ping!".  Out came the discrepancies one by one.  It was part of the original code I had inherited, generated out of an obscure CMS tool (and I've said enough about those vis a vis small business) that was doing it -
tags with no SPACE between the br and the / and mis-location of the IE=EmulateIE7 compatibility tag.  Fixed those - problem disappeared.

But it reinforced to me why it matters - when you may be forced to doubt your own rhetoric in front of clients.  Standards are important.

0 comments:

Post a Comment