table.html 3.7 KB

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