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:




<H1>Hello World</h1>

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

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

(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 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*.


6 thoughts on “Kief XHTML

  1. Wow, i only got 5 correct, but hey i don’t build pages! Nice follow on from the previous post.
    Definitely a nice resource for quizzing potential new hires.
    Finally, where did you find that pic? So geek but my god i love it…

  2. On some of yours:

    re. 6: Its perfectly possible to create an ID which is the same as an element, they’re completely different namespaces. However, it is (as you say), completely retarded.

    re. 13: Upper case tags are actually invalid in XHTML.

    re. 15: It’s not just bad form, it’s illegal, at least within the spec; making it UN law too wouldn’t be a bad idea though.

    Some more:

    You forgot to mention closing the <li>s.

    CSS properties are generally written lower case, but don’t know if that’s specced.

    I’m sure its just a formatting thing, but the quotes around your IDs are extended quotes, and therefore broken (;

    <style> tags should at least have a ‘type’ attribute.

    I’ll leave it at that, rather than critiquing the way CSS cascades and such, and that would become a _long_ conversation (: In an interview, I’m sure this would be great to draw the candidate into a deeper discussion.

  3. Bryn, good points:

    I must admit I completely missed closing the li’s and giving the style tags their “type” when putting the list of mistakes together.

    The extended quotes is just a copy/paste artifact.

    So that’s 20 on the list of official Kief XHTML mistakes.

  4. As you can see, working with Bryn and his know-it-all attitude (and, well, knowing it all) has its benefits…

    I think you’re also required to have a title tag in your head – checking this leads me to “Every HTML document must have a TITLE element in the HEAD section.” at

    And I’m sure someone will pipe up about a missing meta keywords…

    While you’re at it, don’t forget to toss in a simple programming problem that they have to write code in the interview itself to solve.

  5. Hey Neil

    Yup, you’re right, a TITLE is required. So that puts us at 21.

    And while I dont think that META tags are required they obviously make sense so I’ll make it 22… For Skye the SEO star who did mention META right in the very first post about this keif XHTML.


Leave a Reply to Neil Blakey-Milner Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s