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: h1 - h6.

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:

  • del.icio.us
  • Digg
  • Ma.gnolia
  • Reddit
  • StumbleUpon
  • Design Float

Subscribe to this site for regular updates

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

Comments

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