dom_nested_table.html 948 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <!DOCTYPE html
  2. PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  5. <head>
  6. <style>
  7. table { border-collapse: separate; border-spacing: 5px; margin: 1px; border: 1px solid black; }
  8. td { border: 1px solid grey; width: 10px; height: 10px; padding: 2px;}
  9. td td { border: 1px solid green; }
  10. td td td { border: 1px solid red; }
  11. </style>
  12. </head>
  13. <body>
  14. <table>
  15. <tr>
  16. <td>
  17. <table>
  18. <tr>
  19. <td>foo</td>
  20. </tr>
  21. <tr>
  22. <td>bar</td>
  23. </tr>
  24. </table>
  25. </td>
  26. </tr>
  27. </table>
  28. <table style="margin-top: 1em; width: 300px;">
  29. <tr>
  30. <td>
  31. <table>
  32. <tr>
  33. <td>
  34. <table>
  35. <tr>
  36. <td colspan="2">a</td>
  37. </tr>
  38. <tr>
  39. <td>b</td>
  40. <td>c</td>
  41. </tr>
  42. </table>
  43. </td>
  44. <td rowspan="2">d</td>
  45. </tr>
  46. <tr>
  47. <td>e</td>
  48. </tr>
  49. </table>
  50. </td>
  51. <td>f</td>
  52. </tr>
  53. <tr>
  54. <td>g</td>
  55. <td>h</td>
  56. </tr>
  57. </table>
  58. </body>
  59. </html>