Pedantic Semantics
Written at 10am on 05.09.06
Filed under Web Design / That Internet Thing / ALL CATEGORIES
2 comments (closed)
I’m currently working on a site for Sanctuary Records USA, a build I took over from my predecessor. His high level of XHTML markup and CSS presentation is a joy to work with, and showcased such expertise that it actually taught me a thing or two. However, one area the markup falls down in is its use of non-semantic classes and IDs - ‘leftcol’, ‘rightcol’ and the like. By and large it’s fine (and there are certainly no such squint-inducing misdemeanors as span class=”greenText”, thank god), but it got me thinking about semantics and how far we – as web designers – should take them. More than anything else, it made me realise how seriously I now take semantic markup.
The level of pedanticness involved with markup varies from designer to designer, and I’ve found from my own experience and that of others that it often starts with the transition from tables to CSS-based layout. Using CSS to position content rather than just style text can trigger an understanding of separating form from content, and it’s usually not long before you’re fretting over correct paragraph indentations, covering up your old messy Javascript rollovers with CSS image replacements, and threatening to kill anyone using font tags. W3C validation is an almost certain obsession for anyone reaching this point.
But validation doesn’t (and – in its current state – can’t) examine the level of semantic correctness going on in our markup. The W3C have attempted to evaluate semantic markup with their Semantic Data Extractor tool, and, in the process, illustrate that “providing a semantically rich HTML gives much more value to your code: using a semantically rich HTML code allows a better use of CSS, [and] makes your HTML intelligible to a wider range of user agents (especially search engines bots),” but it’s currently unenforcable in their validation tool. So maybe something should change; if the W3C are fussy about killing target="_blank" in XHTML 1.0 strict, why are they letting semantics slip? Is it purely down to the validation technology’s current limitations?
As introduced above, some of the best designers and developers are still using ‘leftcol’ classes to identify a left-hand column and therefore failing to separate design from markup. It’s easy to do, because some site content areas (usually the main ones, like columns) seem to lend themselves to non-semantic names (because they seem so unlikely to change or be referred to as anything else), but if we’re going to get anal about this, it really is no better than span class=”greenText”, because you’re defining the look of something in a document that should be free of any kind of design. Ultimately, the one rule to permanently bear in mind is that an HTML file should be able to have its appearance changed at any time, simply by changing an external CSS file and leaving the markup untouched (the benefits of which are famously exemplified no better than at www.csszengarden.com).
Perhaps semantic markup should be enforced by the W3C and become a forced requirement of XHTML 2.0, but more importantly, if we designers care about doing things right enough to validate, perhaps we should care enough to enforce our own use of semantics.
2 comments (closed)
Comments are currently closed on this entry, but you can still read those that have already been posted...
Search
Forthcoming speaking engagements
- Twiist, Brussels 15th May 2009
- SXSW, Texas 13th - 17th March 2009
- Web Directions North, Colorado 2nd - 7th February 2009
- Oxford Geek Night X (keynote speaker) 21st January 2009
Past speaking engagements
- Web Developers Conference 12th November 2008
- Spletne Urice, Ljubljana 29th October 2008
- SkillSwap Brighton 20th August 2008
- Future Of Web Design, London 17th & 18th April 2008
- Future Of Web Design, New York 7th November 2007
- SkillSwap Bristol 25th September 2007
- iDesign: design for life (part of the London Design Festival) 18th September 2007
- Oxford Geek Night 25th July 2007
Recent posts
- A quick word on advertising
- Round-up of 2008 speaking events
- Samantha Cliffe Photography
- Speaking events in early 2009
- Build your profile to get more freelance work
- Why being freelance does not mean you have to work more hours
- Starkers for WordPress 2.6.2
Categories
- ALL CATEGORIES (94)
- Apple (9)
- Carsonified (2)
- Cooking With Beer (1)
- Design inspiration (2)
- Life In The Real World (33)
- Publication & Recognition (22)
- Software (14)
- Speaking Engagements (13)
- That Internet Thing (15)
- The Business (6)
- This Site (15)
- Travel (11)
- Tutorials & Resources (10)
- Web Design (35)
- Wordpress (6)
- Writing (1)
Blogroll
UPDATED! I’ve been known to while away a few hours on these blogs, most of which are written by my friends in the industry...
- Jørgen Arnor Gårdsø Lom
- Jina Bolton
- Nathan Borror
- Mark Boulton
- Sam Brown
- Andy Budd
- Kevin Cornell
- Jeff Croft
- Jon Hicks
- I Love Typography
- Shaun Inman
- Roger Johansson
- Daniel Mall
- Kyle Meyer
- D. Keith Robinson
- Jason Santa Maria
- Dave Shea
- Jonathan Snook
- Jon Tan
- Typesites
- Tim Van Damme
- Khoi Vinh
- Web Designer Wall
- Rob Weychert
Recent Comments:
- Davorin said: Yep, great lecture, good times afterwards ;)
- Jernej said: It was a real pleasure having you here Elliot! Welcome back anytime:)
- Jernej said: The interview with Elliot Jay Stocks is finally on my blog
- rama said: It seems fine since the ad really blend in with you sidebar. It’s less intrusive...
- Samuel Lavoie said: The sidebarAds is great, I have really no problem at all with this kind of...
- Jason Beaird said: I’m in (the long and tunnel-like) process of redesigning my own site....
- Jesse Vlasveld said: Wouldn’t it look better if you’d align the image to the center?
- José Carlos said: I have to agree with johnno: if we profit intelectually with Elliot’s...
- jeremy_jackson said: There’s nothing wrong with what you’ve done here. You enjoy a...
- Pete said: Personally I don’t have a problem with content relevant, well placed adverts and...
Recent Reads
-
Basics Design: Layout (Gavin Ambrose & Paul Harris) - A beautifully designed book about beautiful design. Some key layout principles are presented in an engaging way, and this is more a book about inspiration than pure instruction.
-
Poe: Illustrated Tales of Mystery and Imagination (Edgar Allan Poe) - Some fine contemporary illustrrators take on some Poe classics and the result is a gorgeous collection of words and art.
-
Penguin By Design (Phil Baines) - A history of Penguin Books’ cover designs, as educational and inspirational as you’d expect from this prolific publisher.
-
Thinking with Type (Ellen Lupton) - I first saw this sitting on a desk in the nytimes.com offices, and after thumbing through it, realised it was one of the best books about the technicalities of typography that I’d seen.
-
Hellboy: The Troll Witch and Other Stories (Mike Mignola) - The latest Hellboy trade paperback collects yet more classic stories, although this time Mignola is joined by other artists.
-
The Ten Commandments of Typography (Paul Felton) - A book of two halves (the flip-side deals with so-called ‘Type Heresy’), this is a witty but informative book bout typographical techniques.
-
Great Beers of Belgium (Michael Jackson) - No, not that Michael Jackson. This is the one who really knows his stuff when it comes to fine beers.
-
London: The Biography (Peter Ackroyd) - A lively, engaging book about the history of London, told as it the city itself were a living thing.
-
Tres Logos (various) - I could look through logo books until the cows come home; this kind of collection is invaluable to the identity designer, and this is, of course, just one book.
-
Business Cards 2: More Ways Of Saying Hello (various) - This is another great source of inspiration and a lovely ‘coffee table’ book that’s a joy to flick through even if you don’t need to design a business card.
-
Schild’s Ladder (Greg Egan) - One of the most full-on sci-fi books I’ve ever read, with its use of real physics and exploration of quantum mechanics shaping much of the narrative.
-
Wolverine: Weapon X (Barry Winsor Smith) - A landmark story in the history of this legendary comic book character, Weapon X has become a real classic.
-
Casa Batlló: Gaudi (various) - Sam and I visited Barcelona last year, where we saw several amazing architectural feats by Gaudi. This book captures some of the beauty that our camera couldn’t.
-
The Fundamentals of Typography (Gavin Ambrose) - This was the first bok I bought specifically about typography, and it pretty much does what it says on the tin, although a nice bit of history is thrown in as well.
-
Analog In, Digital Out (Brendan Dawes) - Magnetic North’s main man explores some arty, experimental projects without any of the ponce usually associated with the genre. This is a book about merging new and old ideas, and it’s inspiring all the way through.
-
The God Delusion (Richard Dawkins) - Possibly one of the most important books in print today.
-
Foundation’s Edge (Issac Asimov) - Another Asimov classic, this part of The Foundation Saga encapsulates some monumental ideas about humanity far beyond the boundaries of regular sci-fi.
-
Web Standards Creativity (various authors) - 10 great lessons for writing better markup, using the latest CSS, and adding subtle Javascript tricks
-
Transcending CSS (Andy Clarke) - Rethink the way you design and code. This book was hugely influential on me whilst building the latest version of this site and made me even more pedantic
-
Dune (Frank Herbert) - An absolutely legendary sci-fi novel full of very complex ideas... much better than the film!
-
Neverwhere (Neil Gaiman) - A dark and charming tale of a man who eschews normal life for the secret underworld of ‘London Below’
Advertise here with SidebarAds
Flickr
View all of my photos on flickr
Hallvord R. M. Steen
23.11.06
#
Semantics is also in the eye of the beholder though. Your classname is probably going to be an English word that is going to mean something to you (beyond describing a particular feature of the layout since that’s not pedantic enough for you :-) ) but wouldn’t mean much to my mother even if she read the source. Unless you go towards microformats, the semantics you get with class=”” don’t go very far. (Well, with Opera you could always provide a User JavaScript to your visitors that would attach behaviour to your chosen semantic class names and thus encourage other webmasters to join in using those :-) )
Case in point: click here
- are the terms “Category” and “Published” ;-)
Elliot Jay Stocks
23.11.06
#
Hey Hallvord,
It’s a pleasure to get a comment from you!
You’re absolutely right - taking it to the extreme level, the very use of the English language in class / ID names is a form of non-semantic markup… but then that is really extreme, and perhaps impossible to avoid all the while code for the web operates in a language so intrinsically tied to daily usage.
Thanks for running the Semantic Data Extractor test on this site; once again you’re absolutely right and I’m ashamed to admit that the mark-up on this site doesn’t really conform to what I was saying in my post; a) because most of the mark-up is thanks to a Wordpress template I’ve been meaning to bury for a long time, and b) because it’s only recently I’ve become that pedantic! ;-)
I guess that makes me a bit of a hypocrite… another reason I desperately need to roll out the new version of this site!