More standards geekery
After my adventures with W3C XHTML standards the other night (see Standards Geekery for details), I was taking a look at their website and noticed that they also have a CSS validator. Yes, apparently there are also standards for CSS.
So, I ran The Wolfs Howl through the validator and was happy to see there were only three or four errors – all of which seemed to be related to the Defensio plug-in that I use. I wasn’t surprised by this, as the XHTML validator had already objected to the Defensio counter that used to be displayed in my sidebar (which is why it is no longer displayed there). Looking at the style sheet for Defensio, it was easy enough to locate the offending lines and comment them out. Hey presto, validating CSS!
But while the CSS now validated, I also had something like 189 ‘warnings’ over the CSS file. There were a number that concerned font family names, where a multi-word name – like Times New Roman – is supposed to be in inverted commas, to maintain the correct whitespacing between the words. Fixing those was relatively easy, although the change required seemed somewhat pointless. Why – or indeed, how – is
font-family: “Times New Roman”, Georgia, “Trebuchet MS”;
more logical than
font-family: Times New Roman, Georgia, Trebuchet MS;
It seems much more illogical to introduce inverted commas for what seems to be no good reason; the code works exactly the same whichever way you do it, but the ‘correct’ way is more convoluted and less instinctive.
Once I’d corrected those, all the remaining warnings seemed to deal with the fact that the same colour or background colour was defined in several different places. Apparently, this isn’t good form. For some of them, I could see the point and taking out the colour reference in one of the places didn’t have any effect on the site. But for others, if I took out the colour reference, the site broke. This, of course, is not acceptable. So I ended up changing a lot of colour references from #FFFFFF to things like #FFFFF1 – not a big enough change to make any difference to the site, but enough to stop the validator complaining.
And this, again, is where my problems with these standards are most evident. To make the site validate as XHTML and CSS, and to remove all the warnings associated with both, I’ve had to remove things from the site or make silly alterations. Yet from what I can see, there’s nothing out of the ordinary about the way any parts of my site are coded – so the standards would seem to be supporting a view of the web that just doesn’t exist and, if it did, would not be very interesting to look at.
SOTD #181
Today’ song is O Mary Don’t You Weep by Bruce Springsteen
Well one of these nights bout 12 o’clock
This old world is gonna rock
Pharaoh’s army got drownded
O Mary don’t you weep
Well Moses stood on the Red Sea shore
Smote’ the water with a two by four
Pharaoh’s army got drownded
O Mary don’t you weep
O Mary don’t you weep, don’t you mourn
O Mary don’t you weep, don’t you mourn
Pharaoh’s army got drownded
O Mary don’t you weep
The Seeger Sessions album – from which this jolly little track comes – is quite possibly my favourite Springsteen album. Don’t get me wrong, Born To Run and the other classics are good, but none of them give you the good time feeling that the Seeger Sessions album does. Even though some of this music was born out of the Great Depression it is wonderfully uplifting. The band, too, are quite obviously having a great time recording it and that really comes through.
If you’re in the UK and have access to the BBC iPlayer, keep an eye out for the BBC Four Session that features music from this album. Alternatively, check out the live DVD.
Standards geekery
Eagle-eyed visitors may have noticed that The New Wolfs Howl has altered slightly over the last day or so; gone is the PayPal button, gone is the Amazon widget. In their place is a shiny new W3C badge. But what does that mean?
Like so much in this modern world of ours, the Net is supposedly subject to a set of technical standards. Created by the World Wide Web Consortium, these standards set out the rules for ‘proper’ web page construction; if your web page doesn’t meet the criteria laid down by W3C, then your web page won’t validate and you run the risk of your content not displaying properly in standards-compliant browsers.
So, it would seem that compliance with the W3C standards is a good thing wouldn’t it? Well, yes and no. You see, the fly in the ointment is Internet Explorer. Microsoft’s workhorse of a browser has been around for years and has never supported the W3C standards. A lot of stuff that works in IE simply won’t work in other browsers, and vice versa.
And that’s the big problem. While all the geeks and nerds might rave about Firefox or Opera or Safari or any of the others – and will call Microsoft and IE all sorts of potty-mouth names while they do it – IE still has somewhere upwards of 80% share of the browser market. Most ordinary internet users don’t care about standards-compliance; they use the browser that comes pre-loaded on their system and, as Windows still has the lions share of the home PC market, that means IE. So, if one browser has such a large market share isn’t that the defacto standard? Should we really care what W3C say, as long as the site works properly in IE? In fact, shouldn’t W3C be saying “This is what works in IE, this is therefore the standard. Go to it!”? It would certainly mean less work for web developers, who currently have to ‘cheat’ their way round getting stuff working in IE, whilst remaining standards-compliant.
Whatever the merits of the W3C might be, though, as a geek I’m always interested to see whether a particular site complies or not and, if it doesn’t, what it is that makes it fail. We’ve done some work on this recently at my company, for one of the sites that we run.
The site in question is an e-commerce site that uses an off-the-shelf shopping cart package. When first loaded, the site validated but once we started putting data into the system we found it no longer validated. The reasons? We’d used “&” in some of our category names, and W3C didn’t like it. Apparently, rather than use “&”, you’re supposed to use “&”. Trouble is, when we tried that we found that the category name didn’t display properly in the browser title bar. So, we left it. After all, it’s only an ampersand.
Of course, that sort of niggling little thing preys on my mind and I couldn’t let it alone. I originally thought it was a problem with the title bar not being able to decode “&” for some reason, but it turned out it was a problem with the way our shopping cart package was written. I found the right bit to change and that web site now validates (at least for the home page – the product pages still need a bit of work).
And this seems to be the way of things with standards compliance. It’s either a little tiny thing, like an unencoded special character which can be easily fixed if you want to, or it’s a seemingly huge problem that you have to be Einstein to figure out.
Even armed with all that knowledge, though, I still decided to try and make The Wolfs Howl validate successfully and last night I sat down to have a go. First of all, I thought I’d just try and get the home page to validate and see where that lead me. It didn’t, but with not many errors, so I decided to have a go at fixing them.
True to form, I had an “&” error; this one was in the code that creates the flyout windows for my Amazon links. Changing it to “&” seemed to solve the validation error without breaking the code, so I ran with it.
Another popular error is when the “alt” tag is missing from an image, and I had a number of those. So I fixed those too.
That left me with a bunch of errors that I couldn’t solve; the validator didn’t like some of the code that was attached to my PayPal button – which was basically a form, which linked to a donation page on PayPal – but it was PayPal’s code and I didn’t know what most of it did so I just removed the button (no-one’s ever clicked it anyway). I had similar problems with the Amazon widget, so that got ditched too – which was going to happen anyway.
After all that, the home page validated. So I moved on the the other pages (SOTD, Also see…, etc) and they all validated first time, except for a missing “alt” tag on an image. Then on to the posts.
With something like 480 posts on the blog, I wasn’t going to look at each one individually but an easy way round that was to change my blog settings to show 500 posts on the each page. That basically made the whole site just one page, which could then be checked in one go.
As I went through adding in all the missing “alt” tags, there were also a number of errors centred around the YouTube videos that I had embedded. Apparently “embed” isn’t a valid command, but it’s what YouTube give you and, it seems, it’s what Flash produces code-wise. So I figured I was stuck; if people like Amazon, YouTube and Adobe aren’t producing standards-compliant code for web pages then, really, what is the point of having them to begin with? (I’ve just done a quick check and google.com, microsoft.com, youtube.com, amazon.co.uk and news.bbc.co.uk all fail validation).
Helpfully, by following a couple of links from the W3C site I was able to find a work-around for my YouTube video problem. You can find the full explanation at A List Apart by following this link, but the basic upshot is that the code YouTube give you for embedding video has to be changed from this:
<object width=”425″ height=”344″><param name=”movie” value=”http://linktothevideo.com/”></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://linktothevidoe.com” type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”425″ height=”344″></embed></object>
to this
<object type=”application/x-shockwave-flash data=”http://linktovideo.com” width=”425″ height=”344″> <param name=”movie” value=”http://linktovideo.com” /></object>
As far as I can see, it works fine and it’s a much simpler piece of code. But why does there need to be all this jumping through hoops to make a web page standards compliant?
I’ve learnt a little bit more about web page coding, and I’ve learnt a bit about standards, so in that respect it has been a worthwhile exercise making The Wolfs Howl compliant. But the whole issue seems a bit cock-eyed to me; there’s a set of standards which are ignored by the world’s most popular browser, as well as by some of the world’s most popular websites. Surely, then, the standards aren’t worth having?
SOTD #180
Today’s song is Bruce’s Philosophers Song by Monty Python
Immanuel Kant was a real pissant
Who was very rarely stable.
Heidegger, Heidegger was a boozy beggar
Who could think you under the table.
David Hume could out-consume
Wilhelm Freidrich Hegel,
And Wittgenstein was a beery swine
Who was just as schloshed as Schlegel.
There’s nothing Nietzsche couldn’t teach ya’
‘Bout the raising of the wrist.
Socrates himself was permanently pissed
John Stuart Mill, of his own free will,
On half a pint of shandy was particularly ill.
Plato, they say, could stick it away;
Half a crate of whiskey every day.
Aristotle, Aristotle was a bugger for the bottle,
Hobbes was fond of his dram,
And Rene Descartes was a drunken fart: “I drink, therefore I am”
Yes, Socrates himself is particularly missed;
A lovely little thinker but a bugger when he’s pissed!
I absolutely love this song; it’s a little throwaway thing, but the lyric is amazingly clever and the team sing it perfectly. It always brings a smile to my face when I hear it – especially that last couplet!
SOTD #179
Today’s song is It Came Out Of The Sky by Creedence Clearwater Revival
Oh, it came out of the sky, landed just a little south of Moline.
Jody fell out of his tractor, couldn’t believe what he seen.
Laid on the ground and shook, fearing for his life.
Then he ran all the way to town screaming “It came out of the sky”
Well, a crowd gathered round and a scientist said it was marsh gas.
Spiro came and made a speech about raising the Mars tax.
The Vatican said, “Woe, the Lord has come.”
Hollywood rushed out an epic film.
And Ronnie the Popular said it was a communist plot.
Oh, the newspapers came and made Jody a national hero.
Walter and Eric said they’d put him on a network TV show.
The White House said “Put the thing in the blue room”
The Vatican said “No, it belongs in Rome”
And Jody said “Ain’t mine but you can have it for seventeen million”
Creedence were, simply, one of the best guitar-based bands ever to come out the US. Their distinct sound – I’ve heard it referred to as swamp rock – and their short, pulsating songs marked them out as all-time greats from the beginning. Sadly, their career was short – only about four years at the end of the 60s, beginning of the 70s – and many people won’t know who they are any more.
Thankfully, we still have their legacy of great songs like this one, a pounding sub-three minute classic that is one of my favourites.

