4 comments | Posted: 16 April 07 in Books, by Nathan Smith
HTML Mastery is a great book, ‘nuff said. I know, you’re probably thinking “But it’s a book about HTML, who cares? CSS is the hip topic nowadays.” Yes, CSS is super-cool and lets you say things like “tables stink” with impunity, but visual style is only as effective as the underlying foundation. Given the choice, would you rather an architect first focus on building your house or painting it?
He begins with the basics, making sure that foundational vocabulary is covered, so that we’re all on the same page. This is paramount when working in a team environment, lest you confuse the
title tag with the
title attribute or some other such craziness. It seems trivial, but really speeds things up when everyone is able to dialog and understand each other. Here’s a choice quote from page 5 about the
alt attribute (more on that here).
If there is one thing I want people to take away from this book, it is this: there is no such thing as an
He also covers all of the nit-pickiness around the now tired argument of HTML vs. XHTML. What it comes down to is that he and I are of the same opinion, that XHTML 1.0 Strict served as
text/html is the way to go for the time being, at least until Internet Explorer supports
application/xhtml+xml (IE7 still doesn’t). On page 13, he says:
My personal preference is to write XHTML served as
text/html… I also prefer the structure, knowing that I must close all of my tags and that I must quote all of my attribute values. I can do all of this in HTML if I choose, but with XHTML there’s the element of compulsion that I believe helps me write better markup.
In the appendix, he also warns against the temptation to use XHTML 1.1 because it’s the latest and greatest. Doing so without knowing why can actually be a hindrance to the aspiring web coder. On page 198, he says:
If you’re writing XHTML 1.1 but serving it as
text/html, don’t fool yourself into thinking that you’re being more advanced than if you were writing any other version of (X)HTML – you’re not. At best, you might be fooling some clients or managers. After all, 1.1 is a higher number than 1.0, so it must be better, right? Sorry, but no, not really – served as HTML, XHTML 1.1 is no better or worse, and it becomes again an issues of how well you write it rather than any inherent strengths and advantages.
He also talks about the inherent caveats of serving your pages as XML vs.
getElementById go out the window, and the
body tag no longer receives any special treatment. Even if you are serving HTML or XHTML as
text/html, you should be aware that directly styling the
html tag can be hazardous. On page 16, he says:
Note that it is possible to style the
htmlelement in your CSS as you would style any other element; however, this can sometimes yield unpredictable results… styling
htmlcan cause browsers to treat the
bodyelement differently – as a
divrather than as the
I digress, back to the topic of HTML Mastery. In my opinion, it is not an issue of whether or not you need to know the contents of this book (you do), but rather – how far can a web designer or developer go without knowing the fundamentals? It’s like kid who learns basketball just by playing pickup games. Bad habits work for awhile, but if you want to play professionally, you need to have a proper jump-shot. This book ranks right up there with CSS Mastery as a must-have for those who are serious about web design as a career.
Discuss This Topic
Comments closed after 2 weeks.