div inside table

andrew Sullivan picture andrew Sullivan · Jun 4, 2010 · Viewed 120.6k times · Source

Can somebody tell me whether div inside a table is allowed or not according to w3c

Answer

echox picture echox · Jun 4, 2010
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head>
    <title>test</title>
  </head>
  <body>
    <table>
      <tr>
        <td>
          <div>content</div>
        </td>
      </tr>
    </table>
  </body>
</html>

This document was successfully checked as XHTML 1.0 Transitional!