Semantic Markup: When your message is more important than your header gradient
Since its inception, the web has always been a communication tool, although for a long time many individuals and companies have only seen it as a marketing venue, much like a big, animated billboard. I'm going to discuss the need for and benefits of designing a website using standards-based, semantic markup, and its implications in today's computing environment.
It's been a wild decade for those who have been involved in web development. At first, people treated the web as a magazine layout, needing identical end results in a wide range of software products. We all know the sad stories of spacer images, seemingly endless recursion of nested tables to achieve positioning, browser detection, and 47 occurrences of a font tag for one page of text, just so the webpage looks perfect.
Most of the major browser conflicts have been resolved, and we have a somewhat level playing field for delivering content, with emphasis on bigger issues like interoperability and device-independence. It's high time we started worrying about delivering the message before formatting the look. More and more people access your information in more and more ways every day. You do want them to get your message, right?
Additionally, everyone starts to worry about appropriating time and energy to search engine optimization (SEO) after making everything look right. What if I told you that 90% of your efforts could be avoided simply by actually following a few rules of thumb that you (should) already know?
Rule #1 - Listen to the Man
I'm talking about our buddy Timothy Berners-Lee, not the Haliburton executive staff. His original vision of the world wide web was a non-linear series of connections (links) between nodes (pages), made up of human-readable content for multimedia presentation spread across computers all over the planet. By human-readable we're referring to the source code of the document itself, not the presentation layer that a browser displays, although that is super important too! Throwing junk markup for presentation in your HTML is like throwing a spike strip on the Nascar track. The browser has a set of standards it follows for organizing the structure of your content, and your presentational markup is purposefully getting in its way. Multiply that by the dozens of devices you may receive requests from in any given day and whammo, the signal gets lost in the noise quite quickly. We've all heard it before, but Keep It Simple, Stupid. And don't even start about your latest Web2.0 mega-project. If no one but Firefox 1.5 users can use it, your viral bittorrent-based AJAX framework for social networking is no more useful than the empty stapler sitting next to me.Rule #2 - Create a hierarchy with your markup
There is a reason that those six header tags exist! Consider the following: your friend is reading a newspaper article to you, but instead of telling youthe headline says thisor
the image caption says thathe tells you that
the big sans-serif text says thisand
the smaller bold text says that.Not quite as helpful, is it? This articulation of communication is what semantic markup is all about. An explicit diagram of your information is delivered and understood by anyone or anything that happens to ask for it, instead of a mess which only a subsection of users with specific browsers can understand (which is admittedly the majority). Once you are projecting clear information, it becomes much more useful and flexible, whatever the viewer's needs.