HTML 5 Validation
HTML 5 Validation
Morg
Posts: 7Questions: 0Answers: 0
Hello,
I just tried validating a page in which I use DataTables (god bless you, at least this tool is (totally) usable without a complete rewrite ;) ).
Small details anyway, here's the output I got from W3C Validator - Are you planning on changing this or is it for backwards compatibility ?
Validation Output: 3 Errors
Error Line 44, Column 83: The cellpadding attribute on the table element is obsolete. Use CSS instead.
…
✉
Error Line 44, Column 83: The cellspacing attribute on the table element is obsolete. Use CSS instead.
…
✉
Error Line 44, Column 83: The value of the border attribute on the table element must be either 1 or the empty string. To regulate the thickness of table borders, Use CSS instead.
…
Again . much thanks, feels great not to have to code everything from scratch to get it done right ;)
I just tried validating a page in which I use DataTables (god bless you, at least this tool is (totally) usable without a complete rewrite ;) ).
Small details anyway, here's the output I got from W3C Validator - Are you planning on changing this or is it for backwards compatibility ?
Validation Output: 3 Errors
Error Line 44, Column 83: The cellpadding attribute on the table element is obsolete. Use CSS instead.
…
✉
Error Line 44, Column 83: The cellspacing attribute on the table element is obsolete. Use CSS instead.
…
✉
Error Line 44, Column 83: The value of the border attribute on the table element must be either 1 or the empty string. To regulate the thickness of table borders, Use CSS instead.
…
Again . much thanks, feels great not to have to code everything from scratch to get it done right ;)
This discussion has been closed.
Replies
table {
border-collapse: collapse;
}
Could you confirm this is a valid solution (and not just a dirty hack) ?
Thanks.
And generally yes border-collapse will do. However cell padding is done with table td { padding: ... }. there are probably other options as well, but those will be the two main ones :-)
Allan
-> removal of old attributes (padding/spacing/border)
-> added border-collapse:collapse; to the table styles (padding / border 0 equals to not setting them in my case)
-> added title on the table (useless but ... compliance ...)