Will they never learn..

Submitted by Ray on Wed, 02/18/2009 - 13:47

The various web standards initiatives have now been going for quite a few years, educating web developers about the optimal ways of coding web pages.

There are still many web developers out there that are either;

  • too old to learn new things
  • haven't heard of web standards!
  • do not validate their code
  • just cant be arsed

An example of this is shown here, this was taken from a website I have been asked to integrate into a CMS, I also feel it is my duty to remove non-standard elements or at least tidy them up a bit.

I found this piece of code;

<td bgcolor="#333333">
  <div align="center">
    <font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="2">
      <strong>
        <font face="Verdana, Arial, Helvetica, sans-serif" size="2">
          nbsp
        </font>
      </strong>
      0.1%
    </font>
  </div>
</td>           

Now for anyone that knows even the slightest bit of HTML they will recognise that this is just a bandwidth consuming piece of crap, god only knows what the developer was thinking!

This can easily be replaced with;

<td>0.1%</td>

Then the style rules are placed within the external stylesheet such as;

td{
    background: #333;
    text-align: centre;
    color:#fff;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 2em;
}

There really is no excuse for this standard of coding in todays world. The Web Standards Project and the W3C have been trying to educate developers to produce code that is clean, legible and semantic, this is neither.

The saddest part is, you would expect this code to have been produced years ago in the dark ages of framesets and tables but no, this was produced no more than 10 months ago!

I shall refrain from naming and shaming the developers, but you know who you are!