In my personal opinion, the overall state of the Web is growing in the acceptance of valid markup. For the most part this is great; having valid markup is often the first hurdle to overcome when becoming a good developer. I know that when my eyes were first opened to valid markup, I was turned off by the fact that I could not do things as I had been doing for some time. Instead of going about writing markup using the methods I had taught myself, I now had a set of rules to follow that made my life that much more difficult. I have come a long way from there and now know that having valid markup is one of the core criteria for a good end product.
Many people have also come to this realization, but the problem is – many have also stopped there. A lot of developers feel that having the W3C Validator tell you that your markup is valid is enough, that you can now move on to the next phase of your project. Passing validation is great, but it is merely a single part of the process. An example is that even though tabular layouts are considered valid, they are still frowned upon.
Semantics of Web
Semantics are a largely overlooked concept when it comes to ‘valid markup’. Many developers who began their practice using tabular layouts now overuse
div to emulate what they were doing with
table. The problem is, when you begin developing using tabular layouts, you find yourself in the mindset of obtaining a grid to work upon as a goal. Should this thought process carry over to your newfound love for CSS, your markup and styling will be severely limited. Once you break free from the restraints tabular layouts hold, you will discover an entirely new set of possibilities when it comes to your styling. Having your markup flooded with
divs instead of
tables in a way defeats the entire reason for making this move to Cascading Stylesheets.
I think that the value of HTML is often overlooked. The language allows you to effectively mark up a document using minimal code and the results are often quite stunning out of the box. The tags offered to you as a developer will be applicable to every part of your document. You will find that effectively marking up your document will essentially help you with your styling in later stages. For instance, those elements of HTML that
display:block by default will more often than not allow you to remove that extra
div that in all honesty does not need to be there. It goes without saying that there are circumstances where you will need to add markup in order to structure the layout to the spec of the design — the point to take home is that you want to keep it to a minimum.
CSS Naked Day
I am a long time reader of Dustin Diaz and was excited to read that he envisioned the First Annual Naked Day. The idea is that on April 5th, 2006, Web sites will remove the style and let their markup flow in the wind. I couldn’t welcome this idea more. Viewing your site without your stylesheet is one way to get an overview of how well your markup is written. With the stylesheet disabled, your site should lose nothing but a pretty face. I am really happy to see so many people in agreement with the idea and I look forward to going down the Naked List and navigating the participating sites. It will be better than hitting
CTRL+Shift+S to have the Web Developer Extension remove the CSS one page at a time. I think it will also inspire many people to take another look at their markup and see how it can be cleaned up if need be.
It is great that so many people want to participate — the problem is the people that do not. I noticed that the article was Dugg and reading through the comments really gives us an insight as to how many people feel. A good number of those people commenting completely miss the point of Dustin’s idea. They speak of a site ‘looking ugly’ and ‘confusing people for a day’. The fact of the matter is — that is the point. If you were to remove the stylesheet from your site, it should not become confusing to use. If it does become difficult to use and navigate, the semantics of your markup have been compromised and should be given some attention. It is great to read some of the good comments there — trying to explain the point behind Naked Day; but unfortunately it is falling on deaf ears.
I think that this will give a good look into the structure of sites with good markup, because those who have bad markup will not be willing to remove their stylesheets. That’s okay, I just hope all the sites that do strip themselves of their stylesheets are used as inspiration for those that need to brush up on the semantics of their markup. Developers need to know that Validity does not equal best practices and that Web standards mean more than validation. When thinking about Validity and Accessibility it is important to remember that the W3C Validator can only determine if your markup is written using the correct methods and syntax, it will not determine if your markup is structured and semantic. That is a job only humans can perform, and should perform. I hope now that validation is really making a stand, we will see less and less of the Divitis/Div Mania trend and more semantic markup across the Internet.