472,782 Members | 1,259 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

<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 4390
> 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
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
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
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
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
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
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.