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,

All the best,

decibel.places's picture

He has: 1,497 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,497 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: 11 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.

I provide affordable seo services and business website design.

RTFVerterra's picture

He has: 110 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: 11 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: 635 posts

Joined: May 2007

decibel.places's picture

He has: 1,497 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}

andolasoft's picture

He has: 16 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'.

Andolasoft is a one stop solution provides offshore software development, Custom Software Development, Rails Development, pentaho kettle, Flash actionscripting , gps applications, business intelligence data warehousing and it consulting services

They have: 23 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: 51 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: 51 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: 50 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: 635 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: 35 posts

Joined: Aug 2011

DIV is useful for create browser compatible website design, which run in all browser

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

now there is a trend of table less design. you will get many benefits of having table less design> the most important is , design with table takes too much time to load and give certain restriction compare to div

They have: 12 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: 8 posts

Joined: Sep 2011

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

They have: 11 posts

Joined: Aug 2011

There are few dis advantages of the design with table especially when it comes to increase the web speed. Where Design with DIV has few advantage but still according to requirement of your business it may change.

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?

[B]Alvin P.[/B]
[URL]http://hostnametoip.com[/URL]

They have: 7 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: 45 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: 22 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.

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.