Consider using the "width" attribute with the tabl

Discussion about HTML and XHTML related issues.

Consider using the "width" attribute with the tabl

Postby RSteinwand » Fri Nov 07, 2008 3:47 pm

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?
User avatar
RSteinwand
Rank IV - Intermediate
Rank IV - Intermediate
 
Posts: 161
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND

Postby Albert Wiersch » Fri Nov 07, 2008 6:43 pm

Hello,

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).
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2361
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Postby Dwight_Stegall » Fri Jan 16, 2009 10:26 am

i suggest you put summary="description of this table goes here" in the table tag if you want it to validate.
Dwight_Stegall
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 6
Joined: Thu Jan 15, 2009 8:52 pm
Location: East Moline, Illinois

Postby CaryD » Sat Jan 17, 2009 9:35 pm

The summary attribute can help with accessibility, but it's not necessary for validating.
User avatar
CaryD
Rank II - Novice
Rank II - Novice
 
Posts: 46
Joined: Sun Oct 01, 2006 2:18 pm
Location: CA


Return to HTML and XHTML

Who is online

Users browsing this forum: No registered users and 1 guest