Kief XHTML

html headA while back while ranting about the lack of qualified (available) web developers I wrote that nasty piece of XHTML that I wanted people to try and correct/comment on.

The awesomeness:

<style>
#H1{
Font-size:10px;
Font-color:Red;
}

Li{
Font-color:white;
}

#greenBox{
Background-color:light-green;
}
</style>

<H1>Hello World</h1>

I’m not fat I’m big boned
<div id=‘greenBox’>
<li>Option 1
<li>Option 2
<li>Option 3
</div>

Of course I want some cheesy poofs
<div id=‘greenBox>
<li>Option 1
<li>Option 2
<li>Option 3
</div>

(excuse the dodgy indenting)

Ok, here goes:

  1. No Document Type
  2. No <HTML>
  3. No <Head>
  4. No Body
  5. Embedded styles are tacky
  6. <h1> is an html element; even if it was possible to create an identity definition called h1 it would still be retarded.
  7. Fixed (px) sized fonts are not good for all kinds of usability reasons.
  8. There is no such thing as “font-color”
  9. While “Red” is currently understood by most browsers, the hex colour code would be a better choice for future compatibility.
  10. Setting your <li>s globally to a foreground colour of white is a bad idea. You’ll be constantly having to override that every time you want it black(ish) again. (I even created an element on the page called greenbox to show that the entire design was going to be on a white background)
  11. id style definitions (#greenBox) really shouldn’t hint at your current presentation (Colours or Layout).  #greenBox is a bad name… especially in a years time when the design calls for that box to be purple.
  12. light-green is not a valid html colour.
  13. Personally I like to use lower case tags… but dammit, don’t mix them up. (H1, h1)
  14. Considering there is no <body>, the “I’m not fat I’m big boned is top level text. It should be inside a body, but additionally it would be better for it to be wrapped in a paragraph or label.
  15. <li>s by themselves, without being wrapped in a <ul> (unordered list) or a <ol> (ordered list) is bad form… but you’d be amazed at how often you see stuff like that on big sites like cnn.com etc.
  16. Reusing the “greenBox” identity will cause various issues in various browsers. It’s an obvious mistake but sadly not picked up by too many people.
  17. greenBox should probably be a class since it’s being used like a class.
  18. The second greenBox quote isn’t closed.

There you go. 18 without any repetition. I’m sure there are some I’ve forgotten. Engage lively debate *now*.

Fat man drilling downstairs

L&HSo we spent the evening listening to the lovely sounds of a wailing hammer drill… I’m all for home improvements and I understand that some people just don’t have the luxury of being able to do them during the day or over weekends, but once 10pm rolls around I really expect anyone who thinks they’re a decent human being to stop drilling holes in their walls.

They didn’t. So I went down. And knocked. And an old fat man answered the door.

“Hello?” he asked as if I might just be popping around for some tea.

“Are you actually building at 10pm?” I replied.

“No, he’s just drilling one hole; is it disturbing you?” he asked leaving me pondering what the Laurel of this Hardy duo could look like.

“At 10pm, yes” I replied while the ‘one hole’ thing bounced around my head annoyingly.

“Ok, We’ll pack up for tonight and carry on in the morning” he said as if I was part of his work crew and should go fetch my lunch box.

“Great” I replied over-enthusiastically.

You really can’t make these things up.