www.webdeveloper.com
Results 1 to 5 of 5

Thread: TABLE or DIV?

  1. #1
    Join Date
    Sep 2006
    Location
    Italy
    Posts
    1

    TABLE or DIV?

    Hi there,
    I noticed that the recent tendency is to avoid tables, and instead use DIVs.
    What do you think about that?

    Cheers,

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,176
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    If it is to display tabular data then it should be coded as a table. If there is no tabular data then NOT using tables makes for smaller, easier to maintain, faster loading code.

    The easiest way I know of to determine whether to use a table or not is to temporarily turn on borders for the table (if you aren't using them anyway). If using borders stuffs up your page so that it looks weird then it should not be using a table.

    In most cases the answer to "Table or Div" is to not use either but to mark up the content using the semantically correct tags. Where appropriate tags do not exist then the answer is "div". The answer to this question is never "table" since if a table is required then the question would not be asked in the first place.
    Last edited by felgall; 09-25-2006 at 03:25 PM.
    Stephen

  4. #4
    Join Date
    Jun 2006
    Location
    Iowa
    Posts
    88
    I agree with felgall on this.

    Since CSS is related with DIV, you'll need to know some CSS to spice up the DIV itself. CSS is just SOOOOOOO much easier to mantain than standard tables.
    Firefox|Arch Linux
    "Wealth is the product of man's capacity to think." - Ayn Rand

  5. #5
    Join Date
    Jul 2005
    Location
    USA
    Posts
    3,910
    Learn CSS. | SSI | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions

    Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.

    Check out my blog.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles