1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

<div> vs <td>

Discussion in 'HTML & Website Design' started by ghyper.com, Jun 7, 2010.

  1. #1
    <div> vs <td>

    which is more convenient and faster?
     
    ghyper.com, Jun 7, 2010 IP
  2. iDaTa

    iDaTa Member

    Messages:
    144
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #2
    Personally, i always use TD for some reason. >.<
    Always have, not sure why though. :eek:
     
    iDaTa, Jun 7, 2010 IP
  3. Astroman

    Astroman Well-Known Member

    Messages:
    2,355
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    135
    #3
    <div> is more convenient and much faster, only total noobs use tables for layout. Tables are for... tables, i.e. tabulated data, so they do have a place within websites. Where there's a need for lists in columns and rows, there's no point in being a table nazi and trying to do it all with divs. However, there's no point bloating your website with loads of useless td, tr and table tags just to make a header, body, footer, left column, right column etc.
     
    Astroman, Jun 7, 2010 IP
    dlb likes this.
  4. designmonkey

    designmonkey Peon

    Messages:
    70
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    @marshal :
    it depend on what context you want to use it?
    if its for layouts, DIV is more appropriate. If you want to present tabular data then TD ( or more precisely TABLE ) is the best pick. Google for "semantic html markup" to start reading on how to code HTML Properly.
    hope it helps :)
     
    designmonkey, Jun 7, 2010 IP
  5. ghyper.com

    ghyper.com Peon

    Messages:
    809
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    yeah I experience div more faster.. but div is not for ie6 ;)
     
    ghyper.com, Jun 7, 2010 IP
  6. Astroman

    Astroman Well-Known Member

    Messages:
    2,355
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    135
    #6
    There's nothing wrong with divs in IE6.
     
    Astroman, Jun 8, 2010 IP
  7. NoamBarz

    NoamBarz Active Member

    Messages:
    242
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #7
    using divs is better because it produces less HTML code. However, getting the CSS to act the way you want can be a challenge.
     
    NoamBarz, Jun 8, 2010 IP
  8. imperialDirectory

    imperialDirectory Peon

    Messages:
    395
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #8
    DIV is more flexible and less code required to achieve the same result. DIVS also give you more control how how things should look. But it does take more time to decorate it and require more testing with different browser, such as Firefox, IE and Chrome. Different tests need to be done with different version of those browser as well as Operating system. A page could look different if you view it on a Mac with Firefox or on Windows with Firefox and you use DIVs on you site.
     
    imperialDirectory, Jun 8, 2010 IP
  9. roopajyothi

    roopajyothi Active Member

    Messages:
    1,302
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #9
    DIV is faster because it uses CSS todo more efficient job!
     
    roopajyothi, Jun 9, 2010 IP
  10. BarbaraACF

    BarbaraACF Peon

    Messages:
    66
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Tables should really only be used for tabular data
     
    BarbaraACF, Jun 9, 2010 IP
  11. fqqs

    fqqs Peon

    Messages:
    29
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    tables arent as bad as many people claim

    they are much more useful than divs when creating standard, cms website with many modules
     
    fqqs, Jun 9, 2010 IP
  12. DK-Tandy

    DK-Tandy Active Member

    Messages:
    330
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    73
    #12
    Table code leave HTML very messy and confusing. Div's are the way forward on this one! (thats of course if it is for layouts and not table data like mentioned above)
     
    DK-Tandy, Jun 10, 2010 IP
  13. diggathedog

    diggathedog Peon

    Messages:
    235
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #13
    If you're not afraid of choking your code a little, there's no reason to avoid using tables per se (unless of course you're looking to change content regularly, in which case divs are less likely to get all messy after a while. Mind you, if you're a little careless with code, then a poorly placed div (or an unclosed one) is more likely to cause BIG problems than a table. I guess it really depends what you want to use them for ...
     
    diggathedog, Jun 10, 2010 IP
  14. ashu_sood08

    ashu_sood08 Peon

    Messages:
    125
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    the tag<td> is used by the most users but the table data is used to insert the data on the table same as we insert in to the site page but the <div> tag is more faster and convinenent to use
     
    ashu_sood08, Jun 10, 2010 IP
  15. irving

    irving Peon

    Messages:
    65
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Absolutely not. Tables are terrible for page layout.

    If you're using tables for layout you are going to experience real delays on pageloads, especially if someone is browsing with a mobile device. The reason for this is that tables have to be completely loaded before they can be rendered, so if your page uses a table to contain the layout, and then further tables to display different parts, the entire page (every single table) has to be loaded before the browser can begin to render it - not a good thing at all.
     
    irving, Jun 10, 2010 IP
  16. Jack_S

    Jack_S Peon

    Messages:
    3
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #16
    The <td> tag defines a standard cell in an HTML table.

    An HTML table has two kinds of cells:

    1) Header cells - contains header information (created with the th element)
    2) Standard cells - contains data (created with the td element)



    The <div> tag defines a division or a section in an HTML document.

    <td>
    is used under <table> tag. to create new row.

    while <div> controls entire page.
     
    Jack_S, Jun 10, 2010 IP
  17. windy

    windy Active Member

    Messages:
    1,093
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #17
    I prefer using DIV
     
    windy, Jun 11, 2010 IP
  18. gamingmaster42

    gamingmaster42 Well-Known Member

    Messages:
    511
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    115
    #18
    DIVs for layout.
    Tables for data.
     
    gamingmaster42, Jun 11, 2010 IP
  19. JNZ

    JNZ Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #19
    <table> should never be used for layouts only for actual data that looks like a table. Also rendering is way faster with <div>s
     
    JNZ, Jun 11, 2010 IP
  20. bsklep

    bsklep Well-Known Member

    Messages:
    2,122
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    165
    #20
    div - 100%
    table - 0%

    U should use only div!
     
    bsklep, Jun 11, 2010 IP