table.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <style>
  2. body {
  3. font-family: Helvetica, Arial, sans-serif;
  4. font-size: 14px;
  5. }
  6. </style>
  7. <div id="editor">
  8. <p>Complex table:</p>
  9. <figure>
  10. <figcaption>Data about the planets of our solar system (Planetary facts taken from <a
  11. href="http://nssdc.gsfc.nasa.gov/planetary/factsheet/">Nasa's Planetary Fact Sheet - Metric</a>.
  12. </figcaption>
  13. <table>
  14. <thead>
  15. <tr>
  16. <td colspan="2">&nbsp;</td>
  17. <th scope="col">Name</th>
  18. <th scope="col">Mass (10<sup>24</sup>kg)</th>
  19. <th scope="col">Diameter (km)</th>
  20. <th scope="col">Density (kg/m<sup>3</sup>)</th>
  21. <th scope="col">Gravity (m/s<sup>2</sup>)</th>
  22. <th scope="col">Length of day (hours)</th>
  23. <th scope="col">Distance from Sun (10<sup>6</sup>km)</th>
  24. <th scope="col">Mean temperature (°C)</th>
  25. <th scope="col">Number of moons</th>
  26. <th scope="col">Notes</th>
  27. </tr>
  28. </thead>
  29. <tbody>
  30. <tr>
  31. <th colspan="2" rowspan="4" scope="rowgroup">Terrestrial planets</th>
  32. <th scope="row">Mercury</th>
  33. <td>0.330</td>
  34. <td>4,879</td>
  35. <td>5427</td>
  36. <td>3.7</td>
  37. <td>4222.6</td>
  38. <td>57.9</td>
  39. <td>167</td>
  40. <td>0</td>
  41. <td>Closest to the Sun</td>
  42. </tr>
  43. <tr>
  44. <th scope="row">Venus</th>
  45. <td>4.87</td>
  46. <td>12,104</td>
  47. <td>5243</td>
  48. <td>8.9</td>
  49. <td>2802.0</td>
  50. <td>108.2</td>
  51. <td>464</td>
  52. <td>0</td>
  53. <td>&nbsp;</td>
  54. </tr>
  55. <tr>
  56. <th scope="row">Earth</th>
  57. <td>5.97</td>
  58. <td>12,756</td>
  59. <td>5514</td>
  60. <td>9.8</td>
  61. <td>24.0</td>
  62. <td>149.6</td>
  63. <td>15</td>
  64. <td>1</td>
  65. <td>Our world</td>
  66. </tr>
  67. <tr>
  68. <th scope="row">Mars</th>
  69. <td>0.642</td>
  70. <td>6,792</td>
  71. <td>3933</td>
  72. <td>3.7</td>
  73. <td>24.7</td>
  74. <td>227.9</td>
  75. <td>-65</td>
  76. <td>2</td>
  77. <td>The red planet</td>
  78. </tr>
  79. <tr>
  80. <th scope="rowgroup" rowspan="4">Jovian planets</th>
  81. <th scope="rowgroup" rowspan="2">Gas giants</th>
  82. <th scope="row">Jupiter</th>
  83. <td>1898</td>
  84. <td>142,984</td>
  85. <td>1326</td>
  86. <td>23.1</td>
  87. <td>9.9</td>
  88. <td>778.6</td>
  89. <td>-110</td>
  90. <td>67</td>
  91. <td>The largest planet</td>
  92. </tr>
  93. <tr>
  94. <th scope="row">Saturn</th>
  95. <td>568</td>
  96. <td>120,536</td>
  97. <td>687</td>
  98. <td>9.0</td>
  99. <td>10.7</td>
  100. <td>1433.5</td>
  101. <td>-140</td>
  102. <td>62</td>
  103. <td>&nbsp;</td>
  104. </tr>
  105. <tr>
  106. <th scope="rowgroup" rowspan="2">Ice giants</th>
  107. <th scope="row">Uranus</th>
  108. <td>86.8</td>
  109. <td>51,118</td>
  110. <td>1271</td>
  111. <td>8.7</td>
  112. <td>17.2</td>
  113. <td>2872.5</td>
  114. <td>-195</td>
  115. <td>27</td>
  116. <td>&nbsp;</td>
  117. </tr>
  118. <tr>
  119. <th scope="row">Neptune</th>
  120. <td>102</td>
  121. <td>49,528</td>
  122. <td>1638</td>
  123. <td>11.0</td>
  124. <td>16.1</td>
  125. <td>4495.1</td>
  126. <td>-200</td>
  127. <td>14</td>
  128. <td>&nbsp;</td>
  129. </tr>
  130. <tr>
  131. <th colspan="2" scope="rowgroup">Dwarf planets</th>
  132. <th scope="row">Pluto</th>
  133. <td>0.0146</td>
  134. <td>2,370</td>
  135. <td>2095</td>
  136. <td>0.7</td>
  137. <td>153.3</td>
  138. <td>5906.4</td>
  139. <td>-225</td>
  140. <td>5</td>
  141. <td>Declassified as a planet in 2006, but this <a
  142. href="http://www.usatoday.com/story/tech/2014/10/02/pluto-planet-solar-system/16578959/">remains controversial</a>.
  143. </td>
  144. </tr>
  145. </tbody>
  146. </table>
  147. </figure>
  148. <p>Table with 2 tbody:</p>
  149. <table>
  150. <tbody>
  151. <tr>
  152. <td>a</td>
  153. <td>b</td>
  154. <td>c</td>
  155. </tr>
  156. </tbody>
  157. <tbody>
  158. <tr>
  159. <td>a</td>
  160. <td>b</td>
  161. <td>c</td>
  162. </tr>
  163. </tbody>
  164. </table>
  165. <p>Table with no tbody:</p>
  166. <table>
  167. <tr>
  168. <td>a</td>
  169. <td>b</td>
  170. <td>c</td>
  171. </tr>
  172. <tr>
  173. <td>a</td>
  174. <td>b</td>
  175. <td>c</td>
  176. </tr>
  177. </table>
  178. <p>Table with thead section between two tbody sections</p>
  179. <table>
  180. <tbody>
  181. <tr>
  182. <td>2</td>
  183. </tr>
  184. </tbody>
  185. <thead>
  186. <tr>
  187. <td>1</td>
  188. </tr>
  189. </thead>
  190. <tbody>
  191. <tr>
  192. <td>3</td>
  193. </tr>
  194. </tbody>
  195. </table>
  196. </div>