This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5032 - Validator reports wrong acceptable parameters for td align attribute
Summary: Validator reports wrong acceptable parameters for td align attribute
Status: RESOLVED INVALID
Alias: None
Product: Validator
Classification: Unclassified
Component: Parser (show other bugs)
Version: HEAD
Hardware: PC All
: P2 minor
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL: not applicable
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-11 07:06 UTC by Jeremy T. Gibson
Modified: 2007-09-11 07:34 UTC (History)
0 users

See Also:


Attachments

Description Jeremy T. Gibson 2007-09-11 07:06:01 UTC
In a document using the HTML 4.01 DTD (and probably others), Validator is incorrectly reporting that the allowable values for the "align" attribute of a "td" tag are: "top", "middle", "bottom", "left", "right".  However, this is incorrect according to the specification (http://www.w3.org/TR/html4/struct/tables.html#h-11.3.2); specifically, the attribute also supports the "center" and "char" parameters and does not support the "top", "middle", or "bottom" parameters (which belong to the "valign" attribute, along with "baseline").

(One could use the text-align attribute of CSS as a work-around, but this is still a bug in the parser because it is not conforming to the specification.)

Here is an example table which fails for me:

<table border="1" width="90%" class="indent">
<tr valign="top">
  <th>Stable Suspension Layouts</th></tr>
<tr valign="top">
  <td>The following configurations are all the possibilities which satisfy the rules of longitudinal and lateral stability and which provide stability on the four different hemispheres (fore, aft, port, star).</td></tr>
</table>

("indent" is a simple CSS element containing a "margin-left: 1cm" attribute.)
Comment 1 Jeremy T. Gibson 2007-09-11 07:07:33 UTC
Er, oops.  The second td tag is supposed to be <td align="center"> but I included the wrong snippet. =P
Comment 2 Olivier Thereaux 2007-09-11 07:27:04 UTC
(In reply to comment #1)
> Er, oops

You're having me puzzled here. 

The spec says:
http://www.w3.org/TR/html4/struct/tables.html#h-11.3.2
align = left|center|right|justify|char
and if I test a document with 
<td align="blah">
The error is:
Error  Line 16, Column 17: value of attribute "ALIGN" cannot be "BLAH"; must be one of "LEFT", "CENTER", "RIGHT", "JUSTIFY", "CHAR" .

Not a bug?
Comment 3 Jeremy T. Gibson 2007-09-11 07:34:55 UTC
Oh, you have gotta be kidding me.  Apparently I was sticking the "center" inside the img tag inside the cell, and I assumed that after stripping out the image tag it would still fail (that's why you don't see td align="center").

Not a bug.

Feck. =P