DIV or TABLE

Discussion in 'HTML & Website Design' started by dannywright, Dec 23, 2011.

  1. #1
    Hello,

    I find some times using table is pretty much easy as compared to div. Which one is best technique to use div or tables in your html designing.

    Danny
     
    dannywright, Dec 23, 2011 IP
  2. devilthemes

    devilthemes Member

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #2
    table is just for displaying tablulate data.

    right tag for right place.
     
    devilthemes, Dec 23, 2011 IP
  3. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #3
    <div> is a html element just like <table>, <p> and everything else. Each has a job they do well. Tables are never to be used for layout. That is not their purpose. A div is a general purpose container of other elements. Tables are used to line up tabular data. Choose the one appropriate for the task at hand.

    If you are having problems lining up div elements how you want, it's because you don't understand how to use CSS to do so. The problem is not the div element itself.
     
    drhowarddrfine, Dec 23, 2011 IP
  4. varindia

    varindia Member

    Messages:
    155
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    38
    #4
    My opinion is its better to use div as we can get better positioning and placing. In particular places like retrieving DB data and other such we such choose for table inside div. With the div browsers issues can be solved easily.
     
    varindia, Dec 24, 2011 IP
  5. thewoodcutter

    thewoodcutter Active Member

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    56
    #5
    i used to use tables earlier when i wasnt good at css. if you know some css, then divs are the way to go...
     
    thewoodcutter, Dec 24, 2011 IP
  6. nanda.kabir

    nanda.kabir Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    <div> tag is very flexible when it comes down to designing part. Must prefer div rather than table.
     
    nanda.kabir, Dec 25, 2011 IP
  7. wakpress

    wakpress Greenhorn

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #7
    my opinion if you using only html its better using div.
    but for php table is great choice.
     
    wakpress, Dec 26, 2011 IP
  8. turnernguyen142

    turnernguyen142 Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I prefer div than html, <table> is only tag for showing values in a table. I build layout by div
     
    turnernguyen142, Dec 29, 2011 IP
  9. harryackerman

    harryackerman Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    DIV is a HTML code Div using is create table.
     
    harryackerman, Dec 30, 2011 IP
  10. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #10
    Yeah. This guy is right. Never use HTML. Only div.
     
    drhowarddrfine, Dec 30, 2011 IP
  11. cathaylist.com

    cathaylist.com Well-Known Member

    Messages:
    437
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    125
    #11
    DIV is better for SEO for the less html code.Table is better for desgin speed and cross browser.I prefer to combine them, need traffic and seo, use DIV, the others are in table.
     
    cathaylist.com, Dec 30, 2011 IP
  12. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #12
    And now the totally clueless join into this parade.
     
    drhowarddrfine, Dec 30, 2011 IP
  13. mmerlinn

    mmerlinn Prominent Member

    Messages:
    3,197
    Likes Received:
    819
    Best Answers:
    7
    Trophy Points:
    320
    #13
    Are you capable of producing some benchmark tests to verify this assertion???
     
    mmerlinn, Dec 30, 2011 IP
  14. wiicker95

    wiicker95 Well-Known Member

    Messages:
    438
    Likes Received:
    37
    Best Answers:
    10
    Trophy Points:
    100
    #14
    Are you sure your post makes sense?? :eek:
     
    wiicker95, Dec 30, 2011 IP
  15. mmerlinn

    mmerlinn Prominent Member

    Messages:
    3,197
    Likes Received:
    819
    Best Answers:
    7
    Trophy Points:
    320
    #15
    Sure it makes sense. All drhowarddrfine was doing was RESTATING the following quote to clarify it for other clueless people.

    Not drhowarddrfine's fault that clueless people are really that clueless and not likely to have a clue that he is being sarcastic because of such a clueless nonsensical statement by one of the clueless on this board.
     
    mmerlinn, Dec 30, 2011 IP
  16. wiicker95

    wiicker95 Well-Known Member

    Messages:
    438
    Likes Received:
    37
    Best Answers:
    10
    Trophy Points:
    100
    #16
    I just quoted the wrong post, lol.... Anyways why to compare tables and divs to begin with?? They have both some different functions... And just to respond to the question of our fellow OP : Tables are not to be used AT ALL, they are obsolete in HTML5, use divs even for tabs

    This is another nonsense, and how the heck can tables be faster more compatible?? Yet the first part is even more hilarious!
     
    wiicker95, Dec 30, 2011 IP
  17. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #17
    Speaking of clueless.
     
    drhowarddrfine, Dec 30, 2011 IP
  18. wiicker95

    wiicker95 Well-Known Member

    Messages:
    438
    Likes Received:
    37
    Best Answers:
    10
    Trophy Points:
    100
    #18
    Please, stop playing a smartass... You know what I meant, the OP wants to use tables for element positioning, which is wrong.... And what I stated is also true, you have shown me some outdated document, but the tables ARE obsolete in HTML5. I really dunno why, I think they are just supporting the CSS more...
     
    wiicker95, Jan 2, 2012 IP
  19. alamlinks

    alamlinks Well-Known Member

    Messages:
    992
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    140
    #19
    DIV and table are two different thing. So both are usefull pending what you want to design.
     
    alamlinks, Jan 2, 2012 IP
  20. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #20
    I know what you meant. The problem is, YOU don't know what you meant.
    Hm. The current W3C HTML5 working document is outdated? It's date-stamped Dec 16, 2011. Hm. Please point me to another which is more up to date.
    I may be a smartass but at least I'm not a dumbass like you. WHATWG HTML5 Living Standard December 16, 2011
     
    drhowarddrfine, Jan 2, 2012 IP