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 22465 - [HTML]: Obsolete use of "border" attribute
Summary: [HTML]: Obsolete use of "border" attribute
Status: RESOLVED WORKSFORME
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC All
: P2 minor
Target Milestone: ---
Assignee: steve faulkner
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-25 20:06 UTC by Andrea Rendine
Modified: 2014-02-24 00:04 UTC (History)
6 users (show)

See Also:


Attachments

Description Andrea Rendine 2013-06-25 20:06:51 UTC
"The border attribute may be specified on a table element to explicitly indicate that the table element is not being used for layout purposes. If specified, the attribute's value must either be the empty string or the value "1". The attribute is used by certain user agents as an indication that borders should be drawn around cells of the table."

Although it is useful to provide ways to recognize layout tables and proper tables in older documents, written following a presentational (i.e. non-semantic) markup, the proposed use of such attribute in both CR HTML5 and WD HTML5.1 is questionable:

 1. it is no longer considered correct to make such a use of tables and modern standard should discourage this bad practice, not provide new ways of carrying it on;

 2. the attribute is not used in a semantic way - were it admitted that real life layout tables can still occur, a "border" attribute does not convey this state more than a < class="layout"> would do. It should be rather advised to make use of ARIA attribute < role> for this.

 3. it is a bad use of a presentational habit - that of designing layouts with no-border tables, while data tables almost always have. This assumption is generic and incorrect. < border=""> says nothing, in real life, about layout tables because they could still have borders. On the other hand, borders on tables are shown by default on most browsers, assuming a correct use. So the specification is useless even in its positive state.

 4. it is not backward-compatible. The proposed values of course don't cover all real scenarios. < border=""> is often replaced by < border="0"> and positive values can be more than 1. So in this syntax it does not save the previus use cases from being labelled incorrect, at least in a html4->5 transition.

 5. HTML5 WHATWG specification has labelled the < border> attribute as obsolete and incorrect since its beginning, as it has done on most presetational attributes.

Consider removing it at least in the current working draft. Users are used to see more than a < border="1"> and standards claim better scenarios.
Comment 1 Simon Pieters 2013-06-25 20:32:43 UTC
(In reply to comment #0)
> borders on tables are shown by default on most browsers, assuming a correct
> use.

No.

> < border=""> is often replaced by < border="0">

No.

> and
> positive values can be more than 1.

The rendering section deals with that. It doesn't mean that values > 1 have to be valid.
Comment 2 Andrea Rendine 2013-06-26 02:37:40 UTC
This says why it CAN be so. But nothing says why it MUST be. What about layout tables? Are they still necessary? An answer longer than 2 letters would be appreciated.
Comment 3 Matthew Turvey 2013-06-26 22:50:23 UTC
(In reply to comment #2)

For more information on the table border and layout table issues see the WG decisions below, and related links. HTH.

Working Group Decision on ISSUE-130: table-layout
http://lists.w3.org/Archives/Public/public-html/2011Mar/0245.html

Working Group Decision on ISSUE-155 table-border
http://lists.w3.org/Archives/Public/public-html/2011Apr/0377.html