文档类型不允许'th'/'td'在这里

Hom*_*lli 0 html xhtml

我正在尝试在下面显示的XHTML文档中创建一个表(为了简洁起见,仅显示相关部分):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head></head>
    <body>
      <table class="dataTable">
       <tfoot><tr><td class="tableFooter" colspan="4"><span>&copy;&nbsp;example.com</span></td></tr></tfoot>
       <tbody>
           <tr id = "firstRowHeader">
               <th class="rowLabel">&nbsp;
               <th class ="rowCol colHeader">ABC
               <th class ="rowCol colHeader">CDE
               <th class ="rowCol colHeader">EFG
           <tr><td class ="rowCategory" colspan ="4">Foo
           <tr><td class="rowLabel"
               <td class ="rowCol cellDataDown">-0.01%
               <td class ="rowCol cellDataNoChange">0.09%
               <td class ="rowCol cellDataNoChange">717.79
           <tr><td class="rowLabel"
               <td class ="rowCol cellDataUp">0.00%
               <td class ="rowCol cellDataNoChange">0.08%
               <td class ="rowCol cellDataNoChange">1,032.02
           <tr><td class="rowLabel"
               <td class ="rowCol cellDataUp">-0.04%
               <td class ="rowCol cellDataNoChange">0.03%
               <td class ="rowCol cellDataNoChange">819.17
           <tr><td class="rowLabel"
               <td class ="rowCol cellDataUp">-0.03%
               <td class ="rowCol cellDataNoChange">0.05%
               <td class ="rowCol cellDataNoChange">877.45
           <tr><td class="rowLabel"
               <td class ="rowCol cellDataUp">-0.00%
               <td class ="rowCol cellDataNoChange">0.09%
               <td class ="rowCol cellDataNoChange">991.57
           <tr><td class="rowLabel"
               <td class ="rowCol cellDataUp">-0.02%
               <td class ="rowCol cellDataNoChange">0.05%
               <td class ="rowCol cellDataNoChange">835.42
           <tr><td class="rowLabel"
               <td class ="rowCol cellDataUp">0.00%
               <td class ="rowCol cellDataNoChange">0.05%
               <td class ="rowCol cellDataNoChange">1,002.40
           <tr><td class="rowLabel"
               <td class ="rowCol cellDataDown">-0.01%
               <td class ="rowCol cellDataNoChange">0.05%
               <td class ="rowCol cellDataNoChange">860.27
       </tbody>
      </table>

    </body>
</html>
Run Code Online (Sandbox Code Playgroud)

当我通过w3c验证器运行这个doc时,我得到了多种错误 - 文档类型不允许'th'(或'td').有人能指出如何解决这个问题吗?

slu*_*ion 6

你没有用或关闭你的任何<td><tr>标签.此外,您错过了所有标签.</tr></td>><td>