When CSS was first getting started, one of the promises laid down was to finally separate content from presentation. When the web was much younger, designers were forced to include elements like spacer images and font tags to style their content. This is considered a mixing of content and presentation.
The goal with CSS was to take any presentational elements out of the code and put them all in CSS files. What you are left with now, in theory, is only content marked up with HTML tags. Then, drum roll please, you could simply drop in a brand new CSS file and completely re-style your site without having to touch any of the markup!
This was the dream, but the reality was that us designers were still left with only a handful of suitable tags to use, and instead had to rely on the workhorse know as the “div” to give us hooks into our code. We use classes and ids that are applied to these divs to move stuff around. Sort of like shuffling boxes.
That is where we stand today.
The neat thing is that with HTML5, comes new hope for truly being able to let content move out and get its own place. The new layout techniques and truly semantic elements in HTML5 look like they will allow for some amazing flexibility in terms of how we come to style our content.
One of the core ideas running across the various proposals is to give web designers a framework for defining a document completely in CSS, and then, still in the CSS file, plop content where we want it. Pretty cool!
This whole idea got me thinking though, are we drawing a realistic line between what is considered content and what is considered style? My understanding has always been that HTML equals content, and CSS equals style. The current landscape of web design, however, requires the creation of somewhat arbitrary and generic elements that ultimately serve no purpose other than to be styled. So the content becomes part of the presentation. That means that HTML now equals presentation.
If HTML is presentation, where did the content go? Simple, into a CMS. That was something some of the early web designers may not have seen coming, the vast proliferation of database driven sites powered by content management software. These databases, generally, don’t store anything but the content of the blog post you’ve typed or the headline you wrote. They don’t care where it gets put or what it’s wrapped in, they are, in a sense, just pure content.
In a way, then, we have achieved some of that initial goal already, where content lives in a database and presentation exists at the template level. These new developments in HTML are still very exciting, I just thought it was neat that after all these years, we finally did it. And all I had to do was redefine the rules.