Html structure best option

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • omerbutt
    Contributor
    • Nov 2006
    • 638

    Html structure best option

    hi
    My question is simple , i had a quarrel now to decide which one is right
    which structure is logically best
    [CODE=HTML]
    <table width="800" border="1" cellspacing="0" cellpadding="0" >
    <tr>
    <td width="300" align="left" valign="top">
    <table width="250" border="1" cellspacing="0" cellpadding="0" >
    <tr>
    <td>Left Menu 1</td>
    </tr>
    </table>
    <table width="100" border="1" cellpadding="0" cellspacing="0" >
    <tr>
    <td>Left Menu 2</td>
    </tr>
    </table>
    </td>
    <td width="500" valign="top">Co ntent Area </td>
    </tr>
    </table>
    [/CODE]
    [CODE=HTML]
    <table width="800" border="1" cellspacing="0" cellpadding="0" >
    <tr>
    <td>
    <table width="300" border="1" cellspacing="0" cellpadding="0" >
    <tr>
    <td width="300" align="left" valign="top">
    <table width="250" border="1" cellspacing="0" cellpadding="0" >
    <tr>
    <td>Left Menu 1</td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td>
    <table width="100" border="1" cellpadding="0" cellspacing="0" >
    <tr>
    <td>Left Menu 2</td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    <td width="500" align="center">
    content
    </td>
    </tr>
    </table>
    [/CODE]
  • markjj
    New Member
    • Oct 2010
    • 1

    #2
    omer, As per my Experience & the structure you mentioned above, the first one is more compact & sort & more over its very easy to take tables from one row to another the second one is bit complex & yeah its “good to” but if you are not using div structure I thing the first one is efficient & more easy to understand as per my thoughts.

    Comment

    • omerbutt
      Contributor
      • Nov 2006
      • 638

      #3
      you mean to say that it would not be Logically wrong or in future it will not effect the structure any how
      moving the tables through the rows is not the problem but when working with complex structure would it be appropriate to do so as far as i know it is logically wrong to put 2 table into 1 <td>
      regards,
      Omer Aslam

      Comment

      • drhowarddrfine
        Recognized Expert Expert
        • Sep 2006
        • 7434

        #4
        Neither make logical sense because tables should never be used for layout. In addition, you are using deprecated markup instead of CSS.

        Comment

        • omerbutt
          Contributor
          • Nov 2006
          • 638

          #5
          but we have been using tables before the web 2.0 structure was introduced either for layouts or any thing else ,
          i could not understand the last line u said
          In addition, you are using deprecated markup instead of CSS.
          u mean to say the width height and other attributes.
          regards,
          omer Aslam

          Comment

          • JKing
            Recognized Expert Top Contributor
            • Jun 2007
            • 1206

            #6
            Using tables for layouts is logically wrong.
            Tables are for tabular data.

            Comment

            • omerbutt
              Contributor
              • Nov 2006
              • 638

              #7
              ok ,
              agreed that is what drhowarddrfine also told but we did used the same tables for layouts before web 2.0 stucture was introduced and people still work with tables regardless of the fact that table is used for tabular data only , my question was simple that is it allright to use multiple tables in one td lets say i am using the table3s for tabular data.....then?

              regards,
              Omer Aslam

              Comment

              • Death Slaught
                Top Contributor
                • Aug 2007
                • 1137

                #8
                Originally posted by omerbutt
                ok ,
                agreed that is what drhowarddrfine also told but we did used the same tables for layouts before web 2.0 stucture was introduced and people still work with tables regardless of the fact that table is used for tabular data only , my question was simple that is it allright to use multiple tables in one td lets say i am using the table3s for tabular data.....then?

                regards,
                Omer Aslam
                Neither, because it isn't being used for tabular data and even if you were, you are using deprecated code. Have a read and make sure to look at David Siegel's article.

                Regardless, the layout you desire can be achieved by using divisions and CSS. It would be faster, cleaner, and styling would be far easier - you're asking for chaos.

                Thanks, Death

                Comment

                • omerbutt
                  Contributor
                  • Nov 2006
                  • 638

                  #9
                  @all
                  common people
                  would any body come to the point , i dont know i ever said in my post that i want to use tables for layout , I JUST ASKED THAT IS IT LOGICALL TO HAVE TWO TABLES I ONE TD , i hope you get my question now
                  regards,
                  Omer Aslam

                  Comment

                  • Death Slaught
                    Top Contributor
                    • Aug 2007
                    • 1137

                    #10
                    Originally posted by omerbutt
                    @all
                    common people
                    would any body come to the point , i dont know i ever said in my post that i want to use tables for layout , I JUST ASKED THAT IS IT LOGICALL TO HAVE TWO TABLES I ONE TD , i hope you get my question now
                    regards,
                    Omer Aslam
                    Yes, and no. You can use as many tables as you would like within a table cell, but that wasn't why the table element was created or how it should it should be implemented. Validators won't yell at you for it but that doesn't mean that it is correct use of the markup.

                    We were simply trying to point you in the right direction, and show you that there is a better way to achieve what you want. The purpose of the link was to show you that tables have been butchered for years, and that it's just a mistake to continue along that path.

                    Thanks, Death

                    Originally posted by drhowarddrfine
                    .
                    Please correct me if I'm mistaken.

                    Comment

                    • omerbutt
                      Contributor
                      • Nov 2006
                      • 638

                      #11
                      yeah ,
                      i myself have upgraded to the web 2.0 , buyt there was a hard boiled discussion going in our lab so we decided to get a neutral judge fo it ;) , thanks alot man
                      reagrds,
                      Omer Aslam

                      Comment

                      • drhowarddrfine
                        Recognized Expert Expert
                        • Sep 2006
                        • 7434

                        #12
                        Um. There is no such thing as a "web 2.0 structure". That term was used to describe communication between applications on the web and has nothing to do with page layout or design.

                        Comment

                        Working...