Which one is better div or table ?

Discussion in 'HTML & Website Design' started by webexperts_666, May 9, 2009.

  1. #1
    Hi there

    Which one is better div or table ?

    Thanks
    WE
     
    webexperts_666, May 9, 2009 IP
  2. Masterful

    Masterful Well-Known Member

    Messages:
    1,653
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    140
    #2
    Better for what?

    If you're talking about layout, then divs and CSS are better. Tables aren't meant for layout; they're meant for presenting tabular data.
     
    Masterful, May 9, 2009 IP
  3. RackSolidHost

    RackSolidHost Peon

    Messages:
    65
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    it depends on what you are trying to achieve
    people tends to use div/css nowdays
     
    RackSolidHost, May 9, 2009 IP
  4. Cheap SEO Services

    Cheap SEO Services <------DoFollow Backlinks

    Messages:
    16,664
    Likes Received:
    1,318
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I prefer table...I find div difficult.
     
    Cheap SEO Services, May 9, 2009 IP
  5. Rad_Dev

    Rad_Dev Peon

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    It's not a question of whether one is better than the other. The question is which one is better for what you want to do. Some designers like to use DIVs with style sheets and others like to use tables for the layout of a site. You can even use them together. I think more experienced designers prefer DIVs as it gives you more control and less restrictions than a simple table. If you do use tables.. Just don't nest 5 layers of them. :eek:
     
    Rad_Dev, May 9, 2009 IP
  6. ashfame

    ashfame Peon

    Messages:
    7
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    DIVs are meant to be used for layout, Tables are not.
    Those are unable to build layouts using DIV, go for table layout and that shows their lack of capabilities in building layouts.
     
    ashfame, May 9, 2009 IP
  7. hch9230

    hch9230 Peon

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I used to use table, now with div
     
    hch9230, May 9, 2009 IP
  8. nandanamnidheesh

    nandanamnidheesh Active Member

    Messages:
    376
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #8
    me to feel div is hard .. but .. now all use tht i think ..
     
    nandanamnidheesh, May 10, 2009 IP
  9. simanto_ist

    simanto_ist Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Div is better than table. table base design have problem to placing content at the pinpoint position what need. But using div any content item can be place any where of browser window .
     
    simanto_ist, May 10, 2009 IP
  10. hash1

    hash1 Active Member

    Messages:
    631
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    85
    #10
    Always Div for me and what Ive always been told is to stay away from tables.
     
    hash1, May 10, 2009 IP
  11. UnFunded

    UnFunded Peon

    Messages:
    295
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #11
    divs, tables are really bad. Very archaic compared to the freedom of divs.

    I saw someone mention they can't do divs, these are important and tables are used less and less - videos for you at the end. They got popular when people saw them as a cool way to set up a layout. Basically, before you used divs, tables were all you had. Now you can float and justify divs, build tables that can be dynamically moved round
    site wide without effecting to others or re-coding everything.

    Picture a div as an object. It's actually what it is. You take that div and you can stack them (in fact, they naturally stack) but you can also put them side by side or completely in a different area, all with just edits to your CSS.

    Tables on the other hand must always follow rules of columns and rows. I mean, I bet you can like, lay out single-cells at a time and maybe style them (?) but I don't know as it'd be kinda dumb to try when I've got divs, you know? Divs also give us layers.

    divs explained in various styles:http://video.google.com/videosearch?hl=en&ie=UTF-8&q=divs&sa=N&tab=wv&um=1#q=div+html&hl=en&emb=1
     
    UnFunded, May 10, 2009 IP
  12. RiodaV

    RiodaV Peon

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    A correct division beetween semantic (xhtml) and presentation (css) can make you save a lot of time in the long and short term.

    Tableless sites are a little difficult to make in the beginning but once you understand the concept behind them they became easier and faster to make than a table-layout site ;)
     
    RiodaV, May 10, 2009 IP
  13. bestchamp

    bestchamp Banned

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #13
    DIVs are a better option than tables on some of the things that they can do so a lot of times I use them in conjunction with one another.
     
    bestchamp, May 10, 2009 IP
  14. blackmarket

    blackmarket Peon

    Messages:
    124
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    both are different. If you use div you need to create styling css file. Table no need css. So div for design only
     
    blackmarket, May 10, 2009 IP
  15. qazu

    qazu Well-Known Member

    Messages:
    1,834
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    165
    #15
    Tables are the best for tabular data ;)
     
    qazu, May 11, 2009 IP
  16. ttheman

    ttheman Banned

    Messages:
    83
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #16
    i am also using div
     
    ttheman, May 11, 2009 IP
  17. normalfx

    normalfx Peon

    Messages:
    111
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #17
    If you are talking about layout. Div is better than table but some case table is better such as newsletter email layout. You need to know which one is fit for a type of your work.
     
    normalfx, May 11, 2009 IP
  18. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #18
    Divs and css is lighter code from what im aware, ever since ive read about best practices it suggests avoiding tables.
     
    pipes, May 20, 2009 IP
  19. UnFunded

    UnFunded Peon

    Messages:
    295
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #19
    Assuming it's for websites, though, and since presentation is everything and everyone who has been doing it for a while hates tables, I'd say use divs, and they really are a lot smarter and easier to use. They are great because, again, you just edit your style sheet and put them wherever you want them - you are in total control. There are uses for tables, but I really haven't seen a table outside of BBCode in a long time - none that I can even remember. The reason is because tables are frowned upon, but not because they are bad, just because div was made to be better than it, and to success it.
     
    UnFunded, May 20, 2009 IP
  20. razer

    razer Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #20
    Divs are probably going to be the most widely used right now.
    Tables work good for some things but ultimately Divs are better imo.
     
    razer, May 20, 2009 IP