[whatwg] <table> Relation between "bordercolor" and "border" attributes

Kishore Bolisetty ganesh.bksv at gmail.com
Tue Mar 6 01:58:12 PST 2012

Hi All,
I have been looking at spec for finding relation between html table's
bordercolor and border attributes.


When a table<http://www.whatwg.org/specs/web-apps/current-work/#the-table-element>element
has a
bordercolor attribute, its value is expected to be parsed using the rules
for parsing a legacy color
and if that does not return an error, the user agent is expected to treat
the attribute as a presentational
the element's 'border-top-color', 'border-right-color',
'border-bottom-color', and 'border-right-color' properties to the resulting

The table<http://www.whatwg.org/specs/web-apps/current-work/#the-table-element>element's
to the pixel length
'border-right-width', 'border-bottom-width',
'border-left-width' on the element. If the attribute is present but parsing
the attribute's value using the rules for parsing non-negative
an error, a default value of 1px is expected to be used for that
property instead.

But it doesn't talks about the behaviour - what if border is not specified
but bordercolor is specified? Looks like browsers have taken their own
implementations on this, Opera and Mozilla displays bordercolor only if
border is specified, where as Safari displays bordercolor assuming a
default border.

Which one is correct behaviour? Is it not necessary to explicitly state
this in the spec?

Example Markup :

<table id="2" borderColor="#00FF00">
                <td >Some Text</td>

Thanks & Regards,

More information about the whatwg mailing list