Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Aug 2007
    Posts
    33
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Best HTML structure

    What do you think is the BEST structure to build an HTML page with. I mean should I use tables in tables in tables or is that the worst? What would be the most efficient to manage?

  • #2
    New Coder
    Join Date
    Sep 2007
    Posts
    13
    Thanks
    0
    Thanked 2 Times in 2 Posts
    tables are for tabular data. use divs.

  • #3
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,928
    Thanks
    6
    Thanked 1,041 Times in 1,014 Posts
    Yes and no (to both posts above).

    Yes, tables are the worst to lay out a page and yes, they are for tabular data (phone directory, sports results, etc.) but using/nesting divs over divs is bad practice as well.

    The best HTML structure is a structure that is semantic (sorry if I’m repeating myself but I just wanna spread the truth ). That’s all one can say. You can’t say use this and that as there is almost no general, “generic” way to lay out a site with fully semantic code since its meaning depends on the content of the site.

    So learn about semantic HTML and use this knowledge to build your site.

  • #4
    New Coder
    Join Date
    Aug 2007
    Posts
    33
    Thanks
    7
    Thanked 0 Times in 0 Posts
    spent most of my time doing backend stuff, and thx for that semantics page, I forget all html tags tomorrow which i learn today ><

  • #5
    Regular Coder Jutlander's Avatar
    Join Date
    Jun 2007
    Location
    In my own sick little world :P
    Posts
    425
    Thanks
    1
    Thanked 12 Times in 12 Posts
    Just skimming through it I can spot one error on that site on semantics. He misses the fact that the text in a blockquote must be wrapped inside a <p> element like this:

    Code:
    <blockquote><p>text</p></blockquote>
    .
    .

  • #6
    New Coder
    Join Date
    Aug 2007
    Posts
    33
    Thanks
    7
    Thanked 0 Times in 0 Posts
    I'm just looking for a neat manageable design. I have a lotta tabular data, but the alignment etc. is messy cause I am generating the code dynamically for the whole html but its generating as per request so the whole HTML doesnt get built at the same time, its built by parts. So right now Im using tables in tables (which I can see isn't a great solution) only for the alignment etc...maybe CSS be better for this eh? too lazy to change stuff now tho ><


  •  

    Posting Permissions

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