Ask Josh™: Assessing Someone’s CSS Mojo

Thursday, August 11, 2005

In this edition of Ask Josh™, cascading stylesheets:

If we were trying to find out a job candidate’s level of expertise with CSS, what would you suggest we ask?

Someone asked me this question in an e-mail a few weeks ago. Seems like a decent question: How does someone who doesn’t know CSS inside-outside go about assessing the skills of a potential hire? Try the following:

  • They should be aware of the difference between form and content: Form goes in the CSS, content in the HTML (unless a layout is too complex to be rendered in CSS without breaking on various browsers). This is a pretty basic concept. They should be aware of that trick that when you pull out the stylesheet entirely, the HTML alone is plainly readable and useable, just not pretty.

  • They should be aware of how to precisely place elements using just CSS — without little clear .gifs everywhere or long strings of  s.

  • See if they can tell you what the ‘box model’ is. It’s a bit esoteric, but since it’s kind of the core CSS concept, it might be a good check just to make sure they know which way’s up as far as CSS code. (Here’s an answer better than I could come up with quickly: ).

  • You could double-check simple code stuff like making sure they know the difference between margin and padding (margin puts pixels outside the ‘box’ and padding puts them inside the ‘box’). And maybe see if they know the differences between using points, pixels, ems, and percentages in sizing fonts (points and pixels are fixed, ems and %s relative).

  • Ask them to talk about how much they love Internet Explorer. If they do love it, they’re probably lying about knowing CSS.

Anyway, there you go. This isn’t a complete and comprehensive test, of course, but how well someone can talk about these topics should give you a good idea of how well they know their CSS.

Now, go forth and be free!