Page 1 of 1

Consider using the "width" attribute with the tabl

Posted: Fri Nov 07, 2008 2:47 pm
by RSteinwand
Hi Albert.

As I'm re-validating my web site, I'm seeing this message for this line:
<table border="0" cellpadding="5" cellspacing="0" style="width:100%">

As you can see, I have a width declared. Is there a significance between the width in the table, vs the width in a style statement?

Posted: Fri Nov 07, 2008 5:43 pm
by Albert Wiersch

I haven't researched this but I suspect there's not any significant difference, at least any that I am currently aware of.

The "width" attribute should be fine since it is not deprecated in HTML 4.01.

It is possible that the CSS allows for more ways in which to specify the width (more units).

Posted: Fri Jan 16, 2009 9:26 am
by Dwight_Stegall
i suggest you put summary="description of this table goes here" in the table tag if you want it to validate.

Posted: Sat Jan 17, 2009 8:35 pm
by CaryD
The summary attribute can help with accessibility, but it's not necessary for validating.