Table or Div's?

AveSatani_666's picture

He has: 21 posts

Joined: Aug 2007

what's the difference of the usual website with tables and the "in" table less website...? just want to know the advantages from both of them...

thanks...Wink

He has: 1,380 posts

Joined: Feb 2002

div's are the way to organize things visually, as per the recent standards by W3C.

Tables used to be used to organize how your site looked, as well as for "tabular data display", but now it's only typically accepted for that data display.

Div's are easy to use, once you understand how they work, but they take a little getting used to. I remember first using them would take me hours to figure out a site's layout... now I can wireframe an entire site in minutes.

All that being said, no one is stopping you from using tables... but you should avoid them unless necessary.

AveSatani_666's picture

He has: 21 posts

Joined: Aug 2007

oic... thanks brady.k

but some tells that div's also help your page to load a little faster?

demonhale's picture

He has: 3,278 posts

Joined: May 2005

AveSatani_666;223068 wrote: oic... thanks brady.k

but some tells that div's also help your page to load a little faster?

Technically no, but divs have more design related parameters that tables don't have, so a purely table based layout is a lot bulkier than a div based layout. Since table properties in the html requires more parameters, and sometimes include the tr and td codes... While a div can use a single id or class and all its properties can be stored in a separate css file.

All in all, a table based layout, file-size-wise is a lot bulkier to an equivalent div or css based layout...

Check the archive as this topic has been discussed before, i think it's titled Tables vs. CSS ...

He has: 1,380 posts

Joined: Feb 2002

Uh... I don't believe so, no.

AveSatani_666's picture

He has: 21 posts

Joined: Aug 2007

ah... i don't believe that too, because i always use tables and more table on my websites...

and still, some company here are looking for those who build websites table less, i don't know what they want... lol

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

Here's another topic with more information:

http://www.webmaster-forums.net/showthread.php?t=37792

CSS layouts have been "in" since about 2002. That's when I switched, and I certainly wasn't the first to do so. This is much more than just a trend - it's a move to more correct use of HTML and proper document structure. See the link above for more info.

He has: 3 posts

Joined: Aug 2007

hi

to my knowledge divs are far better than table structure and loading is faster than tables

He has: 629 posts

Joined: May 2007

The only reason I have found to justify the use of tables is IE's lack of CSS support. If you could use table display properties with IE, as you can in modern browsers, tables would no longer be needed.

My first web class taught tables, and I found them tedious to code and unintuitive. With CSS, I first get the HTML structured right, using heading tags for headings, paragraph tags for paragraphs, and, well, table tags for tables. Only then do I "dress up" the pages with styles.

I think this has several advantages:

1. HTML is meaningful to all visitors, including Google or very old browsers, even without CSS

2. Adding a print style is real easy

3. Changes to appearance mean changing a single style sheet to affect the whole site

4. Floats drop - table cells do not

To explain the last: In my first web class, one exercise meant putting two boxes side by side at the bottom of the page. Using a table and a narrow window, the boxes squished together in very ugly fashion. Switching to floats, the floated boxes moved to one above the other when narrowed, preserving the "looks" of the two boxes.

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

sitesupport's picture

He has: 190 posts

Joined: Jun 2007

I started out using tables with my first websites, it was a mess to edit and divs are MUCH easier.

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.