KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have the following markup as a part of a Razor view: <table> <caption>Presidents</caption> <thead> <tr> <th scope="col">Name</th> <th scope="col">Born</th> <th scope="col">Died</th> </tr> </thead> <tbody> <tr> <th scope="row">Washington</th> <td>1732</td> <td>1799</td> </tr> <!-- etc --> </tbody> </table> With the "target schema for validation" set to HTML5, Visual Studio complains thusly: Warning 1 Validation (HTML5): Element 'th' must not be nested within element 'tbody tfoot'. Is this really true? If so, could someone link to the spec? My understanding was that using <th> for row headers was not just legal but encouraged. It certainly seems fairly common, I could link dozens of tutorials explaining (seemingly sensibly) that it helps with accessibility. Is this a VS bug? A real change coming with HTML5 (a good one? a bad one?)? What's the story?
Tags (comma-separated)
Save Edits
Cancel