473,385 Members | 1,342 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,385 software developers and data experts.

XHTML 1.1 strict validation of <THEAD> and <TFOOT>

I tried validating my gallery page using your validator.
http://validator.w3.org/check?uri=ht...ry%2Findex.asp

To my surprise it informed me that <tfoot> wasn't valid XHTML 1.1 strict,
while it is in the document definition:
http://www.w3.org/TR/xhtml-modulariz...#s_tablemodule

My <thead> tag apparently was valid, while my <tfoot> wasn't.

I would appreciate it if anyone could clarify the matter.

Greetings,
Maurice van Creij
Jul 20 '05 #1
11 6021
Woolly Mittens <wm******@hotmailz.com> wrote:
I tried validating my gallery page using your validator.
http://validator.w3.org/check?uri=ht...ry%2Findex.asp

To my surprise it informed me that <tfoot> wasn't valid XHTML 1.1 strict,
while it is in the document definition:
http://www.w3.org/TR/xhtml-modulariz...#s_tablemodule


The TFOOT element needs to come before the TBODY element. Tables should
contain, in the following order:

- an optional CAPTION, followed by
- optional COL and COLGROUP elements, followed by
- an optional THEAD element, followed by
- an optional TFOOT element, and then
- one or more TBODY elements

See also http://www.htmlhelp.com/reference/ht...les/table.html

(This hasn't changed since HTML 4.)
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

"Pick battles big enough to matter, small enough to win." - Jonathan Kozel
Jul 20 '05 #2

"Darin McGrew" <mc****@stanfordalumni.org> wrote in message
news:bs**********@blue.rahul.net...
Woolly Mittens <wm******@hotmailz.com> wrote:
The TFOOT element needs to come before the TBODY element. Tables should
contain, in the following order:


Thanks, but isn't it odd to put the footer before the body?
Wouldn't that mess up the reading order in text-browsers?
Jul 20 '05 #3
Woolly Mittens wrote:
"Darin McGrew" <mc****@stanfordalumni.org> wrote in message
news:bs**********@blue.rahul.net...
The TFOOT element needs to come before the TBODY element. Tables should
contain, in the following order:


Thanks, but isn't it odd to put the footer before the body?
Wouldn't that mess up the reading order in text-browsers?


If the browser knows how to handle tables - no. The idea is that the
browser could display the header and the footer, right away, then
progressively fill in the body. Even to display the body in a
scrollable box which doesn't overflow the canvas and the header and
footer are visible without scrolling the document.

--
Stanimir
Jul 20 '05 #4
In article <3f*********************@news.wanadoo.nl> in
comp.infosystems.www.authoring.html, Woolly Mittens wrote:

"Darin McGrew" <mc****@stanfordalumni.org> wrote in message
news:bs**********@blue.rahul.net...
Woolly Mittens <wm******@hotmailz.com> wrote:
The TFOOT element needs to come before the TBODY element. Tables should
contain, in the following order:


Thanks, but isn't it odd to put the footer before the body?
Wouldn't that mess up the reading order in text-browsers?


Yes, and maybe.

My Netscape 4 displays the <tfoot> before the body, but MSIE 4
displays the foot after the body. Netscape 6 displays the <tfoot> at
the end of the table.
Here's the test HTML I used:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head><title>TFOOT test</title></head>
<body>
<table border=2>
<thead><tr><th>col head 1</th><th>col head 2</th></tr></thead>
<tfoot><tr><td colspan=2>This table contains no useful content
whatever. The present note is inside a &lt;tfoot&gt;
tag.</td></tr></tfoot>
<tr><td>cell 11</td><td>cell 12</td></tr>
<tr><td>cell 21</td><td>cell 22</td></tr>
<tr><td>cell 31</td><td>cell 32</td></tr>
<tr><td>cell 41</td><td>cell 42</td></tr>
</table>
</body>
</html>
--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #5
Stan Brown wrote:
Here's the test HTML I used:

[snip]


Make use of <tbody> for the last set of rows.
--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #6
In article <bt**********@reader11.wxs.nl> in
comp.infosystems.www.authoring.html, Anne van Kesteren wrote:
Stan Brown wrote:
Here's the test HTML I used:

[snip]


Make use of <tbody> for the last set of rows.


(1) Why? It's optional, so including or omitting it should make no
difference.

(2) As a matter of fact, I did try it both ways, just to see if
there were an obscure bug in NS4. It didn't matter.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #7
Stan Brown wrote:
In article <bt**********@reader11.wxs.nl> in
comp.infosystems.www.authoring.html, Anne van Kesteren wrote:
Stan Brown wrote:
Here's the test HTML I used:

[snip]


Make use of <tbody> for the last set of rows.

(1) Why? It's optional, so including or omitting it should make no
difference.

(2) As a matter of fact, I did try it both ways, just to see if
there were an obscure bug in NS4. It didn't matter.


Why use <thead> (or am I making a stupid mistake here?)?

--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #8
In article <bt**********@reader11.wxs.nl>, one of infinite monkeys
at the keyboard of Anne van Kesteren <ma**@annevankesteren.nl> wrote:
Why use <thead> (or am I making a stupid mistake here?)?


To mark up a table header?

Even if you don't care about semantics, it's a great hook for CSS
if (like me) you find many tables benefit from a clear visual
distinction between the headers and data.

--
Nick Kew

In urgent need of paying work - see http://www.webthing.com/~nick/cv.html
Jul 20 '05 #9
>> In article <bt**********@reader11.wxs.nl> in
comp.infosystems.www.authoring.html, Anne van Kesteren wrote:
Make use of <tbody> for the last set of rows.
Stan Brown wrote:
(1) Why? It's optional, so including or omitting it should make no
difference.

(2) As a matter of fact, I did try it both ways, just to see if
there were an obscure bug in NS4. It didn't matter.

In article <bt**********@reader11.wxs.nl> in
comp.infosystems.www.authoring.html, Anne van Kesteren wrote:Why use <thead> (or am I making a stupid mistake here?)?


Because modern browsers, when printing a long table, will repeat the
column headings at the top of each page if they're inside <thead>.
(Mozilla 1.4 qualifies as a modern browser on this score. I don't
know whether there are any others.)

Once again, why did you suggest putting in <tbody>?

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #10
Stan Brown wrote:
Why use <thead> (or am I making a stupid mistake here?)?
Because modern browsers, when printing a long table, will repeat the
column headings at the top of each page if they're inside <thead>.
(Mozilla 1.4 qualifies as a modern browser on this score. I don't
know whether there are any others.)


Sorry about that, you are totally right. I haven't worked much with
tables yet.
Once again, why did you suggest putting in <tbody>?
<http://www.w3.org/TR/html401/struct/tables.html#h-11.2.3>
The TBODY start tag is always required except when the table contains
only one table body and no table head or foot sections. The TBODY end
tag may always be safely omitted.

--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #11
In article <bt**********@reader10.wxs.nl> in
comp.infosystems.www.authoring.html, Anne van Kesteren wrote:
<http://www.w3.org/TR/html401/struct/tables.html#h-11.2.3>
The TBODY start tag is always required except when the table contains
only one table body and no table head or foot sections. The TBODY end
tag may always be safely omitted.


Thank you!

I was going by the syntax description near the start of that
section, which simply reads:
<!ELEMENT TBODY O O (TR)+ -- table body -->
Start tag: optional, End tag: optional
But you are quite correct about the later text.

Now I'm going to have to go through all my tables that have <thead>
and put in <tbody>. :-( But it's better to know than not to know.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #12

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

Similar topics

8
by: F. Da Costa | last post by:
Following is a snippet of html in which I hide a whole table and try to hide a single row. Here is my question (plz don't chew my head off if its css related instead): Why does the divTable...
9
by: Akseli Mäki | last post by:
Hi, the subject say quite a lot. I have about the following code(4.01 transitional): <p>blaa blaa blaa <ul> <li><a href="foo.html">foo</a></li> <li><a href="bar.html">bar</a></li> </ul>
44
by: Jim M | last post by:
I have had great success with using <iframe> with overflow-y set to auto. I can get a similar look with the <iframe> tag. BUT... In all cases I need to have fixed heights. Is there a way to...
4
by: Adam Smith | last post by:
Hello, Can I use <fieldset><legend><tr><tr> </tr></tr></fieldset></legend> to select multiple rows in a Table such that I can demarcate several rows containing form elements in a table? ...
16
by: matt | last post by:
hello, ive been trying to figure something out, largely thru trial & error. thought perhaps someone else may have knowledge. i have an html table that consists of blocks of related data --...
0
by: pravinnweb | last post by:
Hi, i have one table with <thead>,<tbody> and <tfooter> i have applying the overflow property for <tbody> section in firefox its working fine.but in IE6 the <thead> section is coming in the <tbody>...
1
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.