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 22541 - <table border=1> isn't considered invalid
Summary: <table border=1> isn't considered invalid
Status: RESOLVED FIXED
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL: http://validator.nu/?doc=data%3Atext%...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-02 23:04 UTC by Ian 'Hixie' Hickson
Modified: 2014-01-31 21:22 UTC (History)
4 users (show)

See Also:


Attachments

Description Ian 'Hixie' Hickson 2013-07-02 23:04:06 UTC
This document is marked as valid, but contains a non-conforming presentational attribute:

   <!DOCTYPE html><title></title><table border=1><tr><td></table>

TESTCASE:
http://validator.nu/?doc=data%3Atext%2Fhtml%3Bcharset%3Dutf-8%2C%3C%21DOCTYPE+html%3E%3Ctitle%3E%3C%2Ftitle%3E%3Ctable+border%3D1%3E%3Ctr%3E%3Ctd%3E%3C%2Ftable%3E&showsource=yes
Comment 1 Michael[tm] Smith 2013-07-12 02:25:45 UTC
Cc'in Henri to see what he thinks.

I personally think the spec is a bit out of sync with practical realities in trying to make table@border -- and other presentational attributes on the table element -- a document-conformance error.
Comment 2 Ian 'Hixie' Hickson 2013-08-19 21:58:13 UTC
I don't recall the last time I had to put a border="" attribute on a table. It was certainly many years ago. What's the problematic practical reality here? Why doesn't it apply to all the other presentational things in legacy HTML?
Comment 3 Michael[tm] Smith 2013-08-19 22:11:57 UTC
(In reply to comment #2)
> I don't recall the last time I had to put a border="" attribute on a table.
> It was certainly many years ago. What's the problematic practical reality
> here? Why doesn't it apply to all the other presentational things in legacy
> HTML?

http://dev.opera.com/articles/view/mama-tables/#table

Of the 2,894,184 <table> elements in current Web document collected in that Opera MAMA data set, 2,691,899 -- 93% -- had a "border" attribute. And 2,637,117 has a "width" attribute; then 2,585,020 for "cellpadding", and 2,578,416 for "cellspacing".
Comment 4 Ian 'Hixie' Hickson 2013-10-04 22:21:09 UTC
That's not news; in studies I did back in 2005 I determined that at least 97% of pages were non-conforming in some trivially-detectable way.

If the problem was that the pages were non-conforming, we could just define that anything is conforming. Boom, problem solved, 100% conformance.

That's the not the problem. The problem is that they are using suboptimal technologies, have unintentional errors, and so forth.

The job of a validator is to help authors not make these errors, and to use optimal technologies.

One such optimal technology is CSS, as opposed to legacy-style presentational markup. One such example of presentational markup is border="".
Comment 5 Michael[tm] Smith 2013-10-05 03:32:58 UTC
(In reply to Ian 'Hixie' Hickson from comment #4)
> That's not news; in studies I did back in 2005 I determined that at least
> 97% of pages were non-conforming in some trivially-detectable way.

There's big difference between that general data and the specific data which shows that 93% of tables have a border attribute.
 
> If the problem was that the pages were non-conforming, we could just define
> that anything is conforming. Boom, problem solved, 100% conformance.

Obviously that's reductio ad absurdum. Of course I'm not proposing that.

> That's the not the problem. The problem is that they are using suboptimal
> technologies, have unintentional errors, and so forth.

The very specific problem here is that 93% of tables have a border attribute. Which is extremely high relative to use of other presentational. So while after many years of education and outreach about not using presentational markup we have managed to get the use of it reduced greatly in most all other cases, for some reason people continue to use the border attribute on tables despite knowing that it's considered bad presentational markup. I think it's worthwhile to try to figure out why.

> The job of a validator is to help authors not make these errors, and to use
> optimal technologies.

The job of a validator is also to do that while at the same time not flooding users with messages about markup cases which they are already well aware are conformance errors but that they are continuing to use anyway for some reason.
Comment 6 Henri Sivonen 2013-10-17 12:36:56 UTC
(In reply to Ian 'Hixie' Hickson from comment #0)
> This document is marked as valid, but contains a non-conforming
> presentational attribute:
> 
>    <!DOCTYPE html><title></title><table border=1><tr><td></table>
> 
> TESTCASE:
> http://validator.nu/?doc=data%3Atext%2Fhtml%3Bcharset%3Dutf-
> 8%2C%3C%21DOCTYPE+html%3E%3Ctitle%3E%3C%2Ftitle%3E%3Ctable+border%3D1%3E%3Ctr
> %3E%3Ctd%3E%3C%2Ftable%3E&showsource=yes

Looks like a bug. I have no idea how this happened.

(In reply to Michael[tm] Smith from comment #1)
> Cc'in Henri to see what he thinks.
> 
> I personally think the spec is a bit out of sync with practical realities in
> trying to make table@border -- and other presentational attributes on the
> table element -- a document-conformance error.

I think td/th@align should be valid, since their use varies depending on content and context in ways that make it impractical to treat the alignment as a separated thing.
Comment 7 Michael[tm] Smith 2013-10-17 12:49:38 UTC
(In reply to Henri Sivonen from comment #6)
> (In reply to Ian 'Hixie' Hickson from comment #0)
> > This document is marked as valid, but contains a non-conforming
> > presentational attribute:
> > 
> >    <!DOCTYPE html><title></title><table border=1><tr><td></table>
> > 
> > TESTCASE:
> > http://validator.nu/?doc=data%3Atext%2Fhtml%3Bcharset%3Dutf-
> > 8%2C%3C%21DOCTYPE+html%3E%3Ctitle%3E%3C%2Ftitle%3E%3Ctable+border%3D1%3E%3Ctr
> > %3E%3Ctd%3E%3C%2Ftable%3E&showsource=yes
> 
> Looks like a bug. I have no idea how this happened.

Because of http://html5.org/tools/web-apps-tracker?from=6007&to=6008

Which has subsequently been reverted in the WHATWG HTML spec but not in the W3C HTML5 spec.

At this point one option is that I put it under the W3C-only flag in the validator source, so that the W3C validator behavior matches the W3C spec requirement but the default behavior follows the WHATWG spec.
Comment 8 Michael[tm] Smith 2014-01-31 21:22:01 UTC
I've now fixed the validator sources so that border=1 is reported as an error as expected.

I came around to agreeing we're helping users more by reporting an error for border=1 than we might be helping anything by not reporting it.

Among other reasons is the fact that the validator now allows users to persistently filter out messages that they don't want to see in the "validation results" list (while still allowing them to go back and review the set of filter messages they have opted into filtering out, and give them the option to change their minds and begin un-filtering those messages do that they do show up in the "validation results" list).