473,799 Members | 2,985 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Html structure best option

omerbutt
638 Contributor
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 1569
markjj
1 New Member
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 Contributor
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 Recognized Expert Expert
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 Contributor
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 Recognized Expert Top Contributor
Using tables for layouts is logically wrong.
Tables are for tabular data.
Oct 5 '10 #6
omerbutt
638 Contributor
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 Top Contributor
@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 Contributor
@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 Top Contributor
@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

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

Similar topics

5
2535
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
2320
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 report that fits with each label type, and reads a table dinamically generated. But the problem is page margins. Does Access store page margins and information of that kind within de report? Is there any kind of association between printer...
6
3624
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 regarding project folder structure: "Directory names should follow the namespace for the class For example, I would expect to find the public class "System.Windows.Forms.Control" in "System\Windows\Forms\Control.cs"."
2
7076
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 statement that gets its options from a text file. <select name="contract"> <option value="">Select Contract</option> | <option value="RS-330">RS-330 Northern</option> | these
3
1933
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 document/report to then be displayed on screen as well as the option to download in PDF format. I am just wondering which is the best reporting development tool to use between SQL Reporting Services and Crystal Reports. The report will have three...
2
1801
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 and spans all over. I usually can't follow exactly why they are so elaborate (I know some are containers to avoid browser bugs). In addition to attempting to retrofit a more semantic structure on pages, I have been trying to reduce the...
2
1174
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 in such a way that it can be run in a distributed architectur or locally on one machine, if the system is in distibuted environment communication between the client and the server can be 1. Dot net remoting 2. WCF 3. Web services So which...
1
1228
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 can suggest is to show the fields using label controls and when user press 'Edit', replace the labels with TextBox controls (setting visible
9
6635
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 application's reports I have a page footer with an unbound field that retrieves and shows the name of the company. This is done by Dlookup. My question is: is Dlookup the best way to do this, performance wise, or is there a more efficient way? Thanks in...
1
5201
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 concensus. Many TIA! Mark --
0
9686
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10475
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10250
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10026
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.