loge.hixie.ch

Hixie's Natural Log

2002-11-13 15:42 UTC Markup Challenge 1: Bed and Breakfasts need not apply

While the old school continue to throw up horrendous markup and publish invalid gibberish, there are some of us who are trying to lead the way to writing semantically rich, valid markup that is accessible and free of presentational markup.

However, it seems that even respected champions of standards compliance have their weak moments. To wit:

<script type="text/javascript"> // sneak 'target' attributes past the validator.
for (var i=0;i!=document.links.length;i++) { 
 var L=document.links[i];
 var c=L.className; 
 if (c=='local') {L.target='_top';} 
 else if (c=='photo') {L.target='z';}
 else if (c!='plink') {L.target='lockon';}
}
</script>

Come on! Actually I think it's still technically valid, although it's definitely treading on controversial ground. The "semanticness" of such markup is certainly suspect. And please. If I want to open a link in a new window, I'll do it myself!

What's really sad, though, is that in my search for sites to use as links in the "such as us who are trying to lead the way" bit, I could only find two sites that qualified as closer to perfect than the one I quoted — and mine was one of them. (And I'm not happy about the number of <div> elements and class attributes I use.) Surely someone out there must have a completely valid, semantically rich, no-presentational-markup, strictly compliant Web log? I hereby challenge people to send me links to their Web logs if they think they do. A word of warning, though, if yours isn't, I won't hesitate to use it to humiliate you!

Pingbacks: 1 2 3 4