473,511 Members | 13,618 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<table>: rows with differing number of columns

Hello,

I would like to know whether having a <table> element with two <tr> elements
each containing one <td> elements and two <td> elements, respectively, is
legal from the point of view of standard W3C HTML/XHTML. In particular,
is it legal for table rows to contain differing number of columns,
even when the colspan attribute is not used?

Thanks,

Neil
Jul 20 '05 #1
2 4427
> Hello,

I would like to know whether having a <table> element with two <tr>
elements each containing one <td> elements and two <td> elements,
respectively, is legal from the point of view of standard W3C
HTML/XHTML. In particular,
is it legal for table rows to contain differing number of columns,
even when the colspan attribute is not used?


yes it is legal,

The HTML 4.01 spec states that with respect to calculating the maximum
number of columns in the table,

"if the TABLE element contains no COLGROUP or COL elements, user agents
should base the number of columns on what is required by the rows. The
number of columns is equal to the number of columns required by the row with
the most columns, including cells that span multiple columns. For any row
that has fewer than this number of columns, the end of that row should be
padded with empty cells. The "end" of a row depends on the table
directionality."

--
BenM
http://www.benmeadowcroft.com/
Jul 20 '05 #2
>> Hello,

I would like to know whether having a <table> element with two <tr>
elements each containing one <td> elements and two <td> elements,
respectively, is legal from the point of view of standard W3C
HTML/XHTML. In particular,
is it legal for table rows to contain differing number of columns,
even when the colspan attribute is not used?


yes it is legal,

The HTML 4.01 spec states that with respect to calculating the maximum
number of columns in the table,

"if the TABLE element contains no COLGROUP or COL elements, user
agents should base the number of columns on what is required by the
rows. The number of columns is equal to the number of columns
required by the row with the most columns, including cells that span
multiple columns. For any row that has fewer than this number of
columns, the end of that row should be padded with empty cells. The
"end" of a row depends on the table directionality."

see http://www.w3.org/TR/html401/struct/...tml#h-11.2.4.3 for the
source

--
BenM
http://www.benmeadowcroft.com/
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

61
24397
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
2
5225
by: Leo Duran | last post by:
Hi, I am working on an app right now that makes extensive use of the DataList control. I chose the DataList because I need to do multi row formatting. I am using it like so.
3
1667
by: RC | last post by:
Dear Dudes, I post this in multiple groups for opening brain storm. Sometime I need to query the data from database server then display them into user's browser in HTML <table>. But if the...
12
4181
by: slartybartfast | last post by:
I'm new(ish) to css, comfortable using tables, but trying real hard to move away. Please see http://84.9.125.31/developer/css_test/test5.html NB This issue is with IE & Opera - I've tried IE...
2
2480
by: BD | last post by:
Hi, all. My background is more Oracle than db2. My skills at SQL tuning are quite limited. I'm running 8.2 on Windows. I'm tasked with some SQL optimization, and am doing some explain plans...
0
7148
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7367
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,...
0
7430
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...
0
7517
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...
0
5673
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5072
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...
0
1581
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 ...
1
790
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
451
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...

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.