How To Use Html Div Tag

Is your website markup infected with Div-i-tis? Almost every web author is addicted to it in some way, and many are suffering from its overuse in the work they produce. Not sure if you ever heard it, but Div-i-tis is a term used in the web design community to describe websites that use the <div> tag excessively and without much meaning to the markup.

Div is an HTML element that stands for division, but It has no real semantic value on its own. Nonetheless, it provides an easy way for web designers to structure HTML documents with logical meaning using classes and id's. It's apparent that div has a role and purpose in web design, but it's not applicable to everything, there's a proper way to use it.

Using Div The Right Way

I've been working with it for a while now, and am quite sure I've used it callously at times, but the number of sites saturated in div, it's apparent the div tag is being abused and used indiscriminately on the web today. Many authors use div in a cleaver and logical manner to produce excellent work, but some do it in ways that are inappropriate.

Sometimes you cannot avoid using non semantic elements like Div and Span in an HTML document, but you should not use a div element if there are existing elements that could perform the same function. Most authors don't follow that guidance; real-world needs prevail over theory and proper use of anything on the web.

Improper Use Of Html Div

The div element will continue to play an important role in web designs for some time to come, but with the introduction of new Html5 structural elements, the use of div tags should be minimal. There's no rational, or compelling reason to use 200 pairs of div tags in your html document, markup must have meaning and logic.