Why the class name “wrapper” is so common

We’ve all heard about how bad it is to use “left” and “yellow” as class names and ids. If you name an element “left”, and then decide to move that element to the right, you have to go through all your pages and change that name. Too much work.

If you instead had called it “licenseAgreement”, you would have been better off. Right? Perhaps not. Because we’re forgetting about CMS:es. Those often have some kind of templates, where you as an interface developer define how the HTML should look. But as a interface developer, you have no idea of what kind of content editors will put into your templates. A couple of clicks later your “semantic id” is wrong.

I think this is one of the reasons semantics hasn’t gotten a hold of the CMS world. CMS:es have no idea of what kind of content people will store in them. Their main business goal is to make something generic, that doesn’t assume semantics.

This is why “wrapper” is such a common class name.

7 responses to “Why the class name “wrapper” is so common

  1. This points to another benefit of HTML5, since common class names will become element names (footer, aside, etc), making it a little easier on CMS makers & web developers who use them.

  2. If the person creating the design of a site doesn’t know anything about the content, I think xe should ask someone.

    Design is about communication, and I think the person doing the design should know what kind of information it will be used to communicate.

  3. I think the reason is much simpler than that. Fixed-width layouts often need a div to wrap around all the content, wrapper seems like a good name for it.

    As for semantics not taking a hold in the CMS world, that’s a whole different problem. The blame lies with CMS vendors, the WYSIWYG editors they use, and the people who implement the products. There’s a lot of education that still needs to happen.

  4. I think CMS’s usually fail at producing quality output because by their nature, CMS’s are intended to have low-quality input from untrained users.

    Still, I don’t understand why CMS’s have such horrible CSS support. Maybe it’s just in the K12 education CMS’s I’ve worked with.

  5. because it´s describes the functionality accurate! hillos is right “there’s a wrapper everywhere” :)

Comments are closed.