What is divitis?

Divitis’ is a term used to describe an error common amongst newcomers to building CSS-based sites whereby they use too many divs for everything.

Divitis is related to ‘classitis’ and ‘span mania’, both terms used to describe the practise of combining spans with a class to style content when a more appropriate tag is available, e.g. <span class="heading">Your heading</span> instead, of course, using a heading tag: h1h6.

They are all different terms for using tags improperly and not choosing the tag with the best semantic value.

You see the worst cases of divitis when someone is making their first steps away from creating layouts with tables, but still thinking in tables mode. In these cases, you’ll often find every single <td> has simply been replaced with a <div> which is, of course, no better and carries no more semantic meaning than laying out using tables.

So what’s the cure for divitis? Obviously, using the right tag for the right content, but what if you don’t know what that is? Well, as in medicine, prevention is probably better than a cure, so thepineapplehead at CSS Creator has provided an example of a selection of code suffering from this web-borne affliction and shows how it could be better marked up.

Browse by tags:

Tags: , ,

Share this article:
  • Twitter
  • FriendFeed
  • del.icio.us
  • Digg
  • StumbleUpon
  • Facebook
  • Reddit
  • Sphinn

Subscribe to this site for regular updates

No responses to What is divitis?. Add your own.

Pingbacks

  1. 1

    links from Technoratithing I noticed is that junior people tends to be more aware of what’s coming and what are the best practice to use. They usually produce incredibly clean code with tidy CSS associated to it. As of more experience people seems to be affected bydivitis

  2. 2

    links from Technoratinon è esattamente così: ci sono anche alcuni link con a e un p nel footer, sarà un errore, e un elenco puntato. Tutti gli altri elementi di HTML, niente, non ce n’è traccia. Non c’è un titolo, non c’è un paragrafo di testo, niente. Ma ladivitis

  3. 3

    links from Technoratiow you can cure your CSS disease. What are Divitis and Classitis? The terms Divitis and Classitis were first coined by Jeffrey Zeldman, in his book “Designing With Web Standards” (thanks reader John). There is a pretty good explanation of what it is atTyssen Design: ‘Divitis’ is a term used to describe an error common amongst newcomers to building CSS -based sites whereby they use too many divs for everything. Divitis is related to ‘classitis’ and ’span mania’, both terms

  4. 4

    links from Technorati

Feed for this post's comments