System.Web.UI.WebControls.Style renders obsolete HTML5
I'm using the w3.org HTML validator to test the HTML5 for http://nflpowerrank.com, and I get the following validation error:
The cellspacing attribute on the table element is obsolete. Use CSS instead.
It appears that cellspacing="0", which is rendered by the system.web.ui.webcontrol.style class, is rendering the obsolete version of cellspacing="0" instead of the .css.
I found another related bug on the microsoft site: http://connect.microsoft.com/VisualStudio/feedback/details/747004/system-web-ui-webcontrols-style-renders-obsolete-html5
Does anyone know if Microsoft has fixed this issue? Is there a way not render the cell spacing tag? Or should I use a different style grid?
You could always use a control adapter to render the output as you like.
Microsoft has come up with Control Adapters for such purposes.
Instead of creating alternate renderings of controls for specific devices, this toolkit defines a number of control adapters that change the default table-based renderings of several controls (like Menu, TreeView, and FormView) to eschew tables completely and render using , , and elements with associated styles defined in CSS stylesheets (a common requirement for site designs today).
An implementation of CSS friendly control adapters is already available.