473,320 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Html structure best option

omerbutt
638 512MB
hi
My question is simple , i had a quarrel now to decide which one is right
which structure is logically best
Expand|Select|Wrap|Line Numbers
  1. <table width="800" border="1" cellspacing="0" cellpadding="0">
  2.   <tr>
  3.     <td width="300" align="left" valign="top">
  4.         <table width="250" border="1" cellspacing="0" cellpadding="0">
  5.             <tr>
  6.               <td>Left Menu 1</td>
  7.             </tr>
  8.           </table>
  9.           <table width="100" border="1" cellpadding="0" cellspacing="0">
  10.             <tr>
  11.               <td>Left Menu 2</td>
  12.             </tr>
  13.           </table>
  14.       </td>
  15.     <td width="500" valign="top">Content Area </td>
  16.   </tr>
  17. </table>
  18.  
Expand|Select|Wrap|Line Numbers
  1. <table width="800" border="1" cellspacing="0" cellpadding="0">
  2.     <tr>
  3.     <td>
  4.         <table width="300" border="1" cellspacing="0" cellpadding="0">
  5.               <tr>
  6.                 <td width="300" align="left" valign="top">
  7.                     <table width="250" border="1" cellspacing="0" cellpadding="0">
  8.                         <tr>
  9.                           <td>Left Menu 1</td>
  10.                         </tr>
  11.                       </table>
  12.                   </td>
  13.               </tr>
  14.               <tr>
  15.                   <td>
  16.                       <table width="100" border="1" cellpadding="0" cellspacing="0">
  17.                         <tr>
  18.                           <td>Left Menu 2</td>
  19.                         </tr>
  20.                       </table>
  21.                   </td>
  22.               </tr>
  23.           </table>
  24.       </td>
  25.           <td width="500" align="center">
  26.             content
  27.         </td>
  28.       </tr>
  29. </table>
  30.  
Oct 5 '10 #1
11 1549
markjj
1
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.
Oct 5 '10 #2
omerbutt
638 512MB
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
Oct 5 '10 #3
drhowarddrfine
7,435 Expert 4TB
Neither make logical sense because tables should never be used for layout. In addition, you are using deprecated markup instead of CSS.
Oct 5 '10 #4
omerbutt
638 512MB
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
Oct 5 '10 #5
JKing
1,206 Expert 1GB
Using tables for layouts is logically wrong.
Tables are for tabular data.
Oct 5 '10 #6
omerbutt
638 512MB
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
Oct 5 '10 #7
Death Slaught
1,137 1GB
@omerbutt
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
Oct 5 '10 #8
omerbutt
638 512MB
@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
Oct 5 '10 #9
Death Slaught
1,137 1GB
@omerbutt
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

@drhowarddrfine
Please correct me if I'm mistaken.
Oct 5 '10 #10
omerbutt
638 512MB
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
Oct 5 '10 #11
drhowarddrfine
7,435 Expert 4TB
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.
Oct 5 '10 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: tanpan | last post by:
Hi i'm looking for free php code which will colorize my html source (structure). please help me if u can :) pozdr puipui
2
by: Luis Serrano | last post by:
Hi all, I'm trying to generate labels to print in several different formats, all of them with their own height,width and page margins. We've got this done in MS Access 2000, using a designed...
6
by: Vagif Abilov | last post by:
We decided to adopt .NET coding guidelines posted by Brad Abrams from Microsoft: http://blogs.msdn.com/brada/archive/2005/01/26/361369.aspx Here is what Brad (and AFAIK Microsoft) suggests...
2
by: Steve Wright | last post by:
Hi all, I suspect that I will need Javascript to make this work which is why I am asking the question here! (and also crossposting) Can someone tell me if it is possible to have an HTML select...
3
by: Paul Say | last post by:
I have a asp.net application that will need to create a document/report from data in a database. The user will fill out a form supplying various criteria for parameters. I would like the...
2
by: Eric Lindsay | last post by:
Most of the web pages whose source I look at have a very elaborate structure (even apart from any massive use of Javascript), often with div in div in div layered up to six deep, lots of classes...
2
by: jetal15 | last post by:
To develop a Framework for Content management system, which contians three part 1) core part 2)Data storage and retrival and 3)Workflow In Core part there is need to develop communication layer...
1
by: ma | last post by:
Hello, I want to have a page that displays the fields of a record of a database. When user press 'Edit' button, he would be able to edit the data. What is the best way to do this? What I...
9
by: | last post by:
In my database I have a 'control table' in which basic info is stored about the application, for instance the application's path and the name of the company that is using it. In all of the...
1
by: mh | last post by:
I'm porting a C lex/yacc based project, and would like to redo it in python. What's the best option for a python lex/yacc-like? I've googled a few things, but wanted to see the current...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.