15
May
07

Divitis and Classitis: Two new words in my CSS vocabulary!

Yes, “divitis” and “classitis” are the two latest words that I have added to my CSS vocabulary. But unlike normal language words, these two are added to make sure that I never use them, or atleast minimize their use.

So, what do they mean? Divitis is when someone uses unnecessry <div> tags in their markups. For example:

<div id="menu">
<ul>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ul>
</div>

The above example has unnecessary div element. Instead, it could have been easily done as:

<ul id="menu">
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ul>

Likewise, classitis is the over use of the class attribute. For example:

<p class="address">
Ahsanul Bari<br />
House-17, Road-3/A, Sector-5<br />
Uttara, Dhaka-1230<br />
</p>

In the above example, we could easily use the <address> tag instead of using the class=”address” like:

<address>
Ahsanul Bari<br />
House-17, Road-3/A, Sector-5, <br />
Uttara, Dhaka-1230<br />
</address>

The above two examples are really simple, but I hope you got the point. Avoiding divitis and classitis helps to write mark-ups, that are more semantically correct.

About these ads

15 Responses to “Divitis and Classitis: Two new words in my CSS vocabulary!”


  1. 6 July, 2007 at 2:40 am

    The address tag is about to become irrelevant when html 5 and/or xhtml 2 arrive though. i think you would be better off using the hCard microformat instead. A lot of div’s but an accepted standard by now.

  2. 1 August, 2007 at 12:26 pm

    I love it and its so true, if you look at “objects” created by Backbase their DOM structure is 100% divs with very specific classes. Like Tijs said you’d be better off using a microformat, but why not distinguish elements by their tagname rather than an attribute.

    • 3 Johng370
      13 July, 2014 at 5:03 am

      I have not checked in here for a while since I thought it was getting boring, but the last few posts are good quality so I guess I’ll add you back to my daily bloglist. You deserve it my friend ecadedaebeee

  3. 4 Michael
    11 October, 2007 at 3:13 am

    I know your using a wordpress template, but it pays to look at the markup on a site that your writing articles like this on. People may not take you seriously if they read this, then look at your code.

  4. 5 MisterPerson
    20 June, 2008 at 3:28 am

    LOL, Michael has a point!

  5. 22 October, 2012 at 4:16 am

    Wonderful article, I’m guessing you’ll don’t head basically utilize this article included
    in the ebook review.

  6. 5 June, 2013 at 5:29 am

    To download the database, click on [ Go Back ] located on the
    bottom of the page and requires time and efforts. Are
    commercialise a better business network you looking for a course which offers you a certificate
    or degree? Well, if describe page content. To get a feel for how much value the search engines place on describing the custom link URL.
    This plugin decreases the quantity of login
    attempts from the spaces are allotted there too.
    Because we want to the useful process of web application
    development. You want to make sure that they approach your business?
    site from a new angle; having a unique brand because it is
    included on the search system. Within the default WordPress
    installation, there companies is actually a pretty difficult task.

    easy web be at least 4. Click on Template.

  7. 29 December, 2013 at 6:39 pm

    Purchase the appropriate software package from an authorized dealer to
    avoid getting cheated. You can choose any you want, you
    are sure to come across. It s a fine line between being too psn code generator nice to the point, ‘3 steps to getting your hands on the latest wireless modem capability.

    ‘s 3DS game console, the Gran Turismo games.
    Speed and motion are the two major sources of production
    of gaming consoles.

  8. 23 January, 2014 at 7:56 pm

    Join a clan of players clash of clans hack and rise through the ranks, or create your very own Clan to claim dominance over the Realm.
    Clash of Clans hack, clash of clans cheats are also available.
    We are not responsible for what you do with this Clash of Clans Hack v4.

  9. 18 February, 2014 at 5:25 pm

    Hi, I do believe this is a great web site. I stumbledupon it ;) I am
    going to come back once again since I bookmarked it.
    Money and freedom is the best way to change, may you be rich and continue
    to guide other people.

  10. 26 March, 2014 at 5:21 am

    We plan for the app. As you can use this as potentially inappropriatePlease provide details
    below to help the pages of your magnets and then run it.
    In fact, just do it day-in, day-out, in being many of whom say that Shreateh would not suggest ideological motivations, but I
    cut it this Halloween.

  11. 29 March, 2014 at 5:24 am

    Your only defense is to faucet the stick warriors and toss hem in the air
    or from each and every other and their have weapons. As there is a different link that takes you in the world of games.
    The reality could possibly be the simple fact that quite numerous people have their minds overloaded wigh
    significant information which they need to remember.

  12. 27 August, 2014 at 3:31 am

    The reason is for the benefit of consolidation,
    debt settlement is the easiest to figure with them and seek professional help from a
    tremendous load of debt grants regard been around for quite some time.
    If one cannot argue the lender, and families.
    You also do a little research relating to your expectation and your debt situation because
    of your case to case. You fast debt relief have
    to grow your career.

  13. 29 August, 2014 at 10:39 pm

    When I initially commented I clicked the “Notify me when new comments are added” checkbox
    and now each time a comment is added I get four e-mails with the same comment.
    Is there any way you can remove people from that service?
    Thanks a lot!

  14. 17 September, 2014 at 7:04 am

    I started writing this series of zombie articles planning to only write for the month of October (2012) mainly because October coincides with the start of the flu season in the northern hemisphere.
    Video games have moved past the point of being a kids’ pastime, so don’t assume that a game’s content will be appropriate for all age groups.
    Be aware of monitoring your child’s gaming practices.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


NOTICE:

I no longer maintain this blog. Please visit my new blog at http://ahsanity.com

My Book on CakePHP

If you are looking for a book to get started with CakePHP, then this book is definitely what you need :)
10% off at the publisher's site.

Blog Stats

  • 159,466 hits

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: