Aug
1st

DIV Tag vs TABLE Tag Layout

Files under HTML & CSS

Over the last several years, developers have moved from table-based website structures to div-based structures. Do developers know the reasons for moving to div-based structures?

However, it’s a matter of personal preference. That doesn’t mean there’s anything wrong at all with making a different choice.

Difference Between <Div> tag and <Table> tag

In my opinion, Div tag has a lot of advantage compare to table in terms of page loading speed, crawling your page and SEO friendly. However, tables will make object appear aligned the same in all browsers.

Advantages of Using the <Div> Tag

1.Easily to maintain and organize the site.
2.Webpage with Div tag tends to load faster than table mainly because of less code.
3.It will decrease the code and code to content ratio decreases, Thus, the content is found more easily to bots.

Advantages of <Div> Tag from SEO perspective

Using Div tag is very good for SEO because while you use Tableless layout then you are separating structural and presentational (html and CSS).

tabletagvsdivtag

As you can see from the above example, the table-based structure contains more code than the div-based structure by a ratio as much as 2:1.

Another drawback to tables is that they make it harder to separate content from design. The border, width, cellpadding and cellspacing tags are used in about 90% of all websites that use tables. This adds code to the HTML that should instead go in the CSS.

More lines of code will slow down the development and raises maintenance costs. There’s a limit to how many lines of code a programmer can produce per day, and excess code is more complicated for others to understand.

Besides, more lines of code mean larger file sizes, which mean longer download times. A large code base probably has more bugs.

Disadvantages of Using the <Div> Tag

Using a div for structure can make a page more fragile when content is pushing the DIV to its limit. It can also force columns to fall under each other. But this is usually only happen for older browsers like IE6, I often encounter this issue when changing the whole web layout for my company site.



8 Responses to “DIV Tag vs TABLE Tag Layout”

  1. By Mr.Dream on Aug 1, 2009 | Reply

    now I know how effective DIV are

  2. By Danesh on Aug 19, 2009 | Reply

    DIV, way of the future….

    Like moving from manual transmission to auto in out cars….

  3. By joelmutia on Sep 10, 2009 | Reply

    DIV = really rocks
    Table = is a wood

  4. By buyusedcar on Sep 13, 2009 | Reply

    You are a very smart person! :)

  5. By penny stock on Sep 20, 2009 | Reply

    Wow! what an idea ! What a concept ! Beautiful .. Amazing … :)

  6. By ChewTheobby on Oct 14, 2009 | Reply

    You made some good points there. I did a search on the topic and found most people will agree with your blog.

  7. By veplypemwes on Dec 12, 2009 | Reply

    Great looking site! Maybe you should use ads from Prosperent network. They pay based on sales not a clicks!!! That means way better money than adsense or any PPC:) If you are interested send me an email. I will send you invitation code. Cheers.

  8. By Squirt Ortg on Dec 26, 2009 | Reply

    well.. it’s like I knew!

Sorry, comments for this entry are closed at this time.