Making Use of Semantic Block-level Tags

In Geir Wavik’s Table Layouts vs. Div Layouts: From Hell to… Hell? article, he says

Too many div tags is code smell that content isn’t being described as it should. It means divs are being used when semantic block-level tags would better describe the content; for instance, headings should be wrapped in h1 to h5 tags. Writing semantic code usually reduces the code base; and less divs with floats helps keep browser bugs away.

If you are guilty of divitis, I recommend you give Geir’s article a few minutes of your time.

A quick way to check if you’re on the right track is to disable styles on your page. If it flows properly – a big main title of the site, lists of navigation items, smaller subheadings for sections, news – and makes sense, then you’re doing fine. [ref]

Advertisements

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