XHTML and CSS Prove Their Worth
XHTML-strict, let's admit, is a pain in the ass. XML in general is a pain in the ass - especially if you're trying to put any data into it that you've had around before switching to XML. XHTML is particularly painful because - if you're like me - while you're messing with it you're thinking to yourself "why the hell am I bothering with this? Doesn't HTML work?" which is what I've been doing lately - and then answering to myself: "the reason is because your phone has an XHTML browser and if you want to display pretty pictures, you need to use it." 'Nuff said.
But suddenly today I found another GREAT reason to use XHTML: My resume. Yes indeed, your curriculum vitae (for those of you in this side of the world) is a perfect XHTML document. Because of semantic markup possiblities? Nope. Because of cool CSS tricks? Well sort of, but you can do that in HTML as well. Nope, want to know why XHTML is the killer app for resumes? Because it imports into Microsoft Word 2000 without problems. I hate to endorse an MS product or hint that interop begins with working with MS, but the fact is that recruiters and HR folk always demand an MS doc for their back-end systems and thus I always need to have one handy. Being able to update one document (I've stopped updating my Spanish one) and then doing a simple import without needing tweaking is awesome.
While we're talking about this stuff... I actually discovered the joys of CSS not too long ago when I was redoing this website. I finally grokked it after years of being completely bewildered ("class? id? cascading? Okay, great. But why the hell is my font 2 pixels high?!?!?"). Now I truly see the power of CSS - as shown by the amazing new project CSS Zen Garden, a FANTASTIC site which really shows the power and flexibility of stylesheets. So today armed with both my newfound knowledge and understanding of XHTML from the last few days of battling with Cocoon AND my new respect for CSS, I decided to update my resume.
Nothing special, just a little trimming of the content (changing words into past tense and making my 1996 certification as Microsoft Solutions Developer go bye-bye, it's completely useless now both from a skills and interest point of view) and I also did a complete overhaul of the markup. My markup on my resume was actually pretty clean in the first place... I had played with CSS long ago before I grokked it and got as far as my resume before I stopped. But now the markup is sparkling clean in the XHTML strict sense.
Writing a page in XHTML is actually sort of freeing, especially if you know that you're going to be doing your design with CSS later. You use the "standard" html headers that you haven't touched since 1997: h1, h2, etc. and then throw some paragraphs in (make sure you close those tags), swap out the bold and italics for strong and em, section off different parts of the doc with divs and get rid of those tables and you're good to go. (Actually, tables are allowed in XHTML, you just aren't supposed to use them for anything but tabled data.)
So I did that, then I started modifying the included CSS style section at the top. It's included so that dummies who save my resume offline and then somehow disconnect from the internet will still see the nice resume still. No reason to shock the monkies. I was playing with a trial of TopStyle at first, but ended up just doing it by hand. It was easier and faster it seems to me. First I played with the indentation, then added some rules via the border style, played with some alternate fonts (I thought Kids was pretty fun, but went with Verdana anyways). And then screwed around for a LONG time with the headers. Bold, bordered, background colors, etc. Lots of fun.
At the end, the doc is now pretty simple, totally strict and somewhat esthetically pleasing. I'm sure Word would probably freak out on something more complex, but it works for me right now and that's the important point. Well, I guess the printing could be a little better... maybe I should add an alternate stylesheet? Hmmm... Things to play with.