HTML...what are the main purpose of DIV and TABLE?

Discussion in 'HTML & Website Design' started by dylanbutler84, May 23, 2008.

  1. #1
    *I read from some articles that what can I do in table is can I do with Div... is it true?
    *what is the main purpose of DIV and table? when should I use table and div?
    *what are the techniques to minimize the size of website?
     
    dylanbutler84, May 23, 2008 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    A table is a container for holding positionally related data, for example, a train schedule. Each item is related to other items in the same row in the same manner. Likewise the columns. Arbitrarily moving something from one row or column to another will break the meaning of the item that was established by its position. It has been used to layout web pages, but in any non-trivial layout, the markup cannot be well structured or semantic.

    The div is a container for holding other block level elements, providing a structural grouping, handy for css and javascript hooks. It has no semantic value and should not be parent to raw content. All content belongs in its own semantic block level container, which may be aggregated with other elements within a div.

    cheers,

    gary
     
    kk5st, May 23, 2008 IP
  3. netcollection

    netcollection Active Member

    Messages:
    407
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #3
    use tables just for info's that must be structured in tables, else use div blocks, use div blocks for layouts in this way search engines will see your content much easy.
     
    netcollection, May 23, 2008 IP
  4. dylanj

    dylanj Peon

    Messages:
    173
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #4
    Yup. That's pretty much what I was going to say :)
     
    dylanj, May 23, 2008 IP
  5. Vinny911

    Vinny911 Banned

    Messages:
    114
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Divs are used in blocks which will help you communicate to CSS
     
    Vinny911, May 23, 2008 IP