8
0

table.html 3.8 KB

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