Test Start

This is a layout table. Tables should only be used to display data in rows and columns.
CSS should be used for visual layout. This table could be replaced with four containing DIVs styled via CSS.

Test End

Rule References

Rule Pass IDs Fail IDs
Rule 36
  • id1
none

Calculations

No calculations for test 83

Test Description

  • This test contains a layout table with no nesting.

Test Markup

User Agent Implementation

No user agent implementation information.

HTML Source Code


<div class="wrapper">
   <table id="id1" class="container" border="1">
      <tbody>
      <tr>
         <td>
            This is a layout table.
         </td>
         <td>
            Tables should only be used to display data in rows and columns.
         </td>
      </tr>
      <tr>
         <td>
            CSS should be used for visual layout.
         </td>
         <td>
            This table could be replaced with four containing DIVs styled via CSS.
         </td>
      </tr>
   </tbody>
   </table>
</div>

CSS Code


div.wrapper {
    margin: 20px;
    padding: 10px;
    overflow: visible;
    background-color: #faf7f0;
    border: 1px solid #880000;
    -webkit-border-radius: 10px; /* Safari and Chrome rounded corners */
    -moz-border-radius: 10px; /* Firefox rounded corners */
    border-radius: 10px; /* Opera rounded corners */
}
table.container {
   border: 1px solid black;
   background-color: #fff;
   border-collapse: collapse;
}
table.container td {
   padding: 5px 10px;
   width: 8em;
}
</style>