Results 1 to 4 of 4

Thread: Div or Tables

  1. #1
    Join Date
    Jul 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Div or Tables

    Which elements of HTML either Div or Tables should be used while designing a webpage.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    • Tables are for tabular data - like a menu, price list, games and scores, officers and their titles, that sort of thing.

    • Content like images, and text go in div or p.

    • There are also lists (ul or ol with li's) for things you may want to itemize, like this list in this post.


    There are times when you may want to bend these guidelines, generally that's OK. It's good to avoid tables where there's non-text content unless the dimensions of all items including the table and its cells are spelled out explicitly because not doing so can make the page load in odd ways and take longer to load. Nesting tables is similar. If it's all text content, it generally doesn't matter so much.

    There are also other elements. Each is suited to particular kinds of content.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    For layout, use divs positioned with CSS. For specific kinds of data/content that fits well in a table, use a table.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #4
    Join Date
    May 2011
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I also agree div use only in case of CSS and for data use table.

Bookmarks

Posting Permissions

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