What is better to use? "div" or "tables"

They have: 2 posts

Joined: Feb 2009

Hi all,

Im new here and I would like to know some doubts that I have. I observer that some websites are using "div" and other "tables".

What is the difference between those 2? What do I get or what results, if I use "div" or "tables" in my website.

To be honest, before I was using "tables" in my header and footer templates, and my site had a score of 95% SEO in whois.domaintools.com

But after I switched all things to "div", now my score had lowered to 85%, is that posible and could had been because of the changing code?

Some friends told me that using "div" is better for a fastest speed of the website...

I would like to hear some professional opinions.
Thanks alot to all,

Mod note: Comments are closed. Enough good responses have been posted and the question is no longer relevant.

All the best,

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

There has been a trend towards using container elements - div, p, span - with css for structural layout

Tables remain the proper format for tabular data (eg election results, etc)

Coders who use Dreamweaver often generate horrendous files full of nested tables - my theory is that it does it so they need to be edited in Dreamweaver.

Browsers do not display tables until they load completely, so if you are serving complex tables, they can appear more slowly than non-tabled content.

I am not familiar with whois.domaintools.com so I cannot speak to the validity of the analysis. You should make sure your div codes are standards compliant.

They have: 18 posts

Joined: Jan 2009

Hi.
I've just posted a similar response on another site. Layout tables are old and boring, but they do tend to be rendered better across a wide range of browsers. You can have a sexy site full of divs and CCS2, but you risk it not working well for everyone, unless you spend a great deal of time with javascript IF statements. Perhaps this is what has been reflected in your lowered score...

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

COSSOFT wrote:
You can have a sexy site full of divs and CCS2 ... unless you spend a great deal of time with javascript IF statements.

I would not recommend using javascript for css browser compatibility.

It is better to use conditional comments to include browser-specific stylesheets.

I would like to add here, tables may be fine for WYSIWYG editors like Dreamweaver, but if you ever need to do hand-coding they add a lot of "sorting" time to the project.

lenaosterhagen's picture

They have: 10 posts

Joined: Jan 2012

Yes I highly recommend decibel.places. Using Conditional comments is better way. In these days IE8 always have similar issues in many sites build in CMS Technologies.

They have: 12 posts

Joined: Feb 2009

sasakakee, I usually stick with divs as they tend to be better for SEO reasons and you have greater control over the page with them. For example in a 3 column design you can make your main content of your page appear as the first thing in the coding but on the page visually it could be in the middle or far right.

Also it's important to look at the factors whois.domaintools.com is looking at for the score they gave you.You might want to really investigate what it was that lowered your score specifically as I bet you can fix that easily and still keep the divs.

RTFVerterra's picture

He has: 109 posts

Joined: Dec 2008

My site is running in tables before, it looks good across many browsers until one of my students told me that they cannot access my site using their mobile phone. This gave me some thought, mobile phone is so handy and many youth are using it to surf the web. When I change my design to div, my Google analytics showed a 500+ percent increase in traffic. Most of my students access my site via their mobile phone.

lenaosterhagen's picture

They have: 10 posts

Joined: Jan 2012

Yes I agree with RTFVerterra. The div tag is better than table tag in respect to SEO point of view.
And it is also true that div also works good in small screen like mobiles. As divides the are of HTMl document automatically or we can also define the % we require.
{link removed}

They have: 18 posts

Joined: Jan 2009

I have to agree with decibel.places. I love my Dreamweaver. It can give you pixel perfect rendering that looks like its printed on a piece of paper. Although, once 'weaved you can never return to editing the page by hand as the human mind cannot grasp the complexities of a Dreamweaver layout table Sad
I think that it's a form of vendor lock-in.

They have: 9 posts

Joined: Feb 2009

I am using "div" .
It loads faster and if I want to edit my website which has like 50 pages I only have to edit the CSS file.

They have: 4 posts

Joined: Jan 2009

I'm still real new to the whole idea of web(site) development and am dabbling in many aspects of it to find my niche.

I have some things running in HTML / CSS, some in XHTML / CSS, some ASP, some on Apache, some on iis6 with .net 2.0 some with .net 3.5 and I've yet to publish anything that includes any javascript at all.

One thing all my sites have in common is a use of divs rather than tables for anything I need to put in columns or segregate. I've had some slight issues with IE 6.0 not redering my Apache hosted site correctly but that could have a number of different root cause issues.

IMHO (for all the little experience I have) I like div.

skrehlik
"never, ever, EVER question the Net Admin"
unless I'm writing a web page...

He has: 629 posts

Joined: May 2007

decibel.places's picture

He has: 1,494 posts

Joined: Jun 2008

yeah, but in 1996 tables were the best way to achieve complex layouts... things change but people often stick to what they know

They have: 4 posts

Joined: Mar 2009

i am using div . easy

She has: 20 posts

Joined: May 2008

I think div is better option than table.
And may be something wrong on your website css so it is down to 85%

He has: 53 posts

Joined: Jun 2010

hi, Out of two has it's own functionality then i think that which you need you use it without any hesitation..

They have: 5 posts

Joined: Jul 2010

Layout tables are old and boring, but tend to be better made in a wide range of browsers. You can have a site full of sexy and CCS2 divs, but may not work well for everyone, unless you spend much time with javascript FI. That may be what is reflected in its rating down ...

They have: 9 posts

Joined: Jul 2010

Functinality and page speed - divs

devashishseo's picture

They have: 18 posts

Joined: Aug 2010

I think div is better option because it loads faster.
{links removed}

He has: 13 posts

Joined: May 2010

yes, using div to create a website makes it lighter as compared to tables and also helps in SEO point of view. the drop in seo ranking may be because of some other reasons apart from using 'div'.

They have: 22 posts

Joined: Oct 2010

If you are creating a website, use of the div tag is better, it provide you a easy method to create website with a proper spacing on website.

thesslstore's picture

They have: 8 posts

Joined: Aug 2010

There are no effect by this only view is some kind of changed.
div is divisional element of HTML and table is put for the table view like in HTML.

Both are working same but i prefer Table for making page because after it is easy to put other content any where in page is easy.

They have: 1 posts

Joined: Nov 2010

Tables add a lot of code to websites and should only be used to display tabular data, not to define layout. The layout should be done using CSS features.

A div is a container for other HTML tags and is most useful when the same style is to be applied to a section of HTML. It is not used to display data in tabular form.

You can learn about all these things and more here: HTML Tutorial

They have: 4 posts

Joined: Nov 2010

My site is at the tables before, looks good in most browsers until one thing I noticed that I can not access my site through mobile phones. I gave some thought, mobile phone, is very convenient and many people use it to surf the web. When I change my div plan, my analysis of Google showed a 500 percent increase in traffic.

They have: 3 posts

Joined: Nov 2010

Yes the table was in general use since last time but the div is now getting popular because the speed gets advanced for the website. as far as I know it might be due to the change in the code.

They have: 5 posts

Joined: Nov 2010

Div is much better options for this.
As you know that previously all persons use tables in their websites. And due to change in the field of websites. DIV comes in market. And this is very good in comparison of Tables.

They have: 5 posts

Joined: Nov 2010

DIV are obviously much better than tables. DIV with CSS are better in most cases, they are much more flexible. Should not hurt your SEO efforts. The tables are obsolete. DIV are very flexible and can actually manage to taste.

WildWest's picture

They have: 1 posts

Joined: Dec 2010

Using Div and css tags is the easiest and flexible way to create quality and professional websites.

They have: 1 posts

Joined: Nov 2010

div is popular now

They have: 58 posts

Joined: Dec 2010

who the heck really wants to deal with messy tables today? div tags are the way to go - life table-less! Smiling

They have: 58 posts

Joined: Dec 2010

And, yeah by the way HTML5 has arrived so don't fancy using anymore!

They have: 5 posts

Joined: Dec 2010

Div is best because it loads very fast. Same case table is a same for using WYSIWYG editors like Dreamweaver. In hard coding you must have to add lots of sorting time to the project.

They have: 46 posts

Joined: Jan 2011

Table and div tag both have their own advantage if u have to display your contents in the rows and columns format then you can use table tag you can get the same format using div tag also but its simpler by using the table tag and div tag it somewhat similar to paragraph tag
and if you are using images also with the text and to keep the look consistent and os same size then table tag is best

They have: 4 posts

Joined: Jan 2011

Now a days Div is very much popular in market. It is very easy to use and also any beginner can learn it very easily. I used it my website, you can edit and modify it very quickly.

They have: 10 posts

Joined: Sep 2008

Webpages created using "Div" tag are lighter in weight and easily loaded on browser as comparison to webpages created using "Tables" but "Div" tag can be used efficiently in creating static pages when it comes to designing dynamic webpages "Tables" become the must part for organizing dynamic controls on a webpage...

He has: 7 posts

Joined: Feb 2011

div is better option because it loads faster and you can control it by css
as i know google and other search engine doesn't like tabs very much and they prefer div and span .

He has: 629 posts

Joined: May 2007

Tables were considered necessary for layout before IE 6 came out, because CSS support was very different between Netscape and Internet Explorer - the two main browsers of the 1990s.

Happily I began learning Web design in 2002, when IE 6 justly "won the browser wars" as the first browser to conform to standards - albeit the CSS 1, not CSS 2 standard. I never did get the hang of nested tables, and fell in love with CSS - and have never looked back!

When HTML5 has better support we'll be able to use elements that are more meaningful than DIVs and SPANS (which have no meaning). Table-based layouts have long been consigned to the dustbin of history. Check this slideshow from 2003: http://www.hotdesign.com/seybold/06problems.html

Cordially, David
--
delete from internet where user_agent="MSIE" and version < 8;

They have: 1 posts

Joined: Mar 2011

There has been a trend towards using container elements - div, p, span - with css for structural layout

They have: 2 posts

Joined: Oct 2011

Divs are for website designs, where the tables are meant to be used for storing data such as stock levels on a website. Using div is more better and good. It is a css property but table is obsolete and more of old html. Most beginners use tables because they are easier to use but divs professionals to build web site design. I would suggest using divs for your website and in the long term will work in your favor, as they will have to change the design after learning to design with divs.

They have: 5 posts

Joined: Oct 2011

Div is the best because it loads quickly. Table of the same case is the same for the use of WYSIWYG editors like Dreamweaver. The hard coding you must have to add a lot of time to sort out the project.

They have: 10 posts

Joined: Aug 2011

Table is the old way for layout while div is the current, div is better for CSS especially those pure CSS sites, cleaner codes.. BUT.. if you're a bit lazy and just want dirty codes, go for tables.. I'm still using tables sometimes for programming hehe, lazy me, but ofcourse not on website main pages

They have: 7 posts

Joined: Sep 2011

I go with div its better to work with them as compared to tables.

They have: 2 posts

Joined: Nov 2011

div tables question

<table>
<tr>
<td>Hello</td>
<td>World</td>
</tr>
</table>

Can be done with this:

<div>
<div style="display: table-row;">
<div style="display: table-cell;">Hello</div>
<div style="display: table-cell;">World</div>
</div>
</div>

Now, is there any difference between these two in terms of performance and/or render speed or they're just the same?

Alvin P.

They have: 6 posts

Joined: Nov 2011

Hi, at present time Div tag mostly use for table less and light website designing and it is very easy to use through CSS.

Chocopie's picture

They have: 2 posts

Joined: Jan 2012

Using div tag is the better concept. Tables are not SEO friendly and it is an obsolete web designing method.

He has: 39 posts

Joined: Jan 2012

I am newbie in this field. Recently i am also confused between these twos. Than i consult with my teacher. He give me the best idea. He said that div Are the best and commonly used with the help of CSS.

They have: 20 posts

Joined: Jan 2012

Div is the best as compare to table

jeanneluv's picture

She has: 20 posts

Joined: Feb 2012

it's depend on its need. div is more simple but can not arrange for columns or rows as table have.

Walter Warner's picture

They have: 21 posts

Joined: Feb 2012

I actually can't believe you posted this question in 2009 bro. Tables are dead. Then again for the longest time Wikipedia, Craigslist and FACEBOOK were using tables for the longest time.....

Walter Warner's picture

They have: 21 posts

Joined: Feb 2012

By the way I believe the following article will definitely show you why using tables for layout is outdated. Enjoy.

http://www.chromaticsites.com/blog/13-reasons-why-css-is-superior-to-tab...

DarkLight's picture

He has: 287 posts

Joined: Oct 2007

Tables were OK back in the 90s as templates and layouts. Nowadays, you definately want to use DIVs for content layout. Tables are still OK for displaying rows of information out of the database, numbers, values, etc.

All the best news here: https://newsbotnet.com

They have: 13 posts

Joined: Apr 2012

DIV should be used. Search engines have become really intelligent. So if you use table they would consider it as table. If you want them to know that it is a layout you need to use div. I would say..always follow conventions to get the best results.

Good Luck!

Wedding Casino | Casino Table Hire | Fun Casino Hire | Casino Hire London

Casino Equipment hire including Roulette, Blackjack, Poker and Craps, fully staffed with professional croupiers, for weddings, parties and events

They have: 8 posts

Joined: Jan 2012

tables are not SEO friendly, so irecommend you to use divs

They have: 2 posts

Joined: Feb 2012

div is popular now. but i think table and Div can use together.

scriptgeni's picture

He has: 2 posts

Joined: Apr 2009

It's very very simple guys, use only tables for tabular data, use div for layout only!

They have: 3 posts

Joined: Jul 2012

I used to use tables for listings but now I use YUI or JQuery which are javascript and CSS

They have: 1 posts

Joined: Jun 2012

in my website i used both table as main frame div inside the table in leftside menu is it good or i should not do so and also i have made all pages in htm not html..which i better and faster indexed htm or html. Please suggest me what should i do..i have to make it w3c compliant

He has: 13 posts

Joined: Jun 2012

using div.. it's great... loads faster

They have: 11 posts

Joined: Mar 2012

yes using div is great idea for building websites because div loads faster then tables. source code is not messy like in tables. div are easy to use, but you should have great knowlege of css before using div in Your website

Alien 9's picture

They have: 4 posts

Joined: Jul 2012

Always use divs instead of tables.

Here's a few reasons why:
Divs are much easier to work with.
Using divs instead of tables will allow your page to load much faster.
Divs work better with CSS.
SEO - Google seems to like divs more than tables
As newer versions of HTML come to be, tables may eventually phased out
Much less coding to deal with

aruldave's picture

They have: 12 posts

Joined: Jun 2012

DIV elements are very useful where document elements are can not be rendered by other HTML elements. DIV elements doesn't have any semantic meaning like other HTML elements but works well than HTML tables while grouping or labeling the document elements. The non standard HTML element to make the page more semantically meaningful in general terms. DIV is better for grouping, styling and labeling the document elements and Table is better for displaying results from querying the database

They have: 3 posts

Joined: Aug 2012

If you want to use div or table in header then you should prefer div because it is lighter as compare to table.

They have: 1 posts

Joined: Aug 2012

I find div more useful and effective then table. if we are using different header in our website different pages then div is more useful.

They have: 18 posts

Joined: Sep 2012

Tables is a dying piece of code. Div's are getting used everywhere today and they open a lot of doors in HTML programming.

They have: 2 posts

Joined: Sep 2012

Hi,
In my opinion div tag is better than table,
1.Div tag supports multiple styles and positions.
2. For nested design better to use div tag instead to table because in table we put more tables but in the div simple structure.

They have: 2 posts

Joined: Dec 2012

Use div. It is accessible for many devices and also it is easy once you have learned it properly. Tables are also good but the point is it will be really hard to customize.

They have: 2 posts

Joined: Sep 2012

According to me "Div " tag is better because it reduces the slowness of website speed. Also Div tag supports multiple styles and positions when compared to table.

chillychillY's picture

They have: 1 posts

Joined: Jan 2013

I don’t like to make confusion with tables so positively Div.

They have: 11 posts

Joined: Apr 2013

I think that div is better to use than table in our html code, because we use div for code reusability i.e. to make the class in css use it many times through div tag.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.