Skip to content

Content

Table

Clean and minimal styles for <table>, providing consistent spacings and a minimal unbordered look.

PlanetDiam. (km)Dist. to Sun (AU)Grav. (m/s²)
Mercury4,8800.393.7
Venus12,1040.728.9
Earth12,7421.009.8
Mars6,7791.523.7
Average9,1260.916.5
<table>
  <thead>
    <tr>
      <th scope="col">Planet</th>
      <th scope="col">Diameter (km)</th>
      <th scope="col">Distance to Sun (AU)</th>
      <th scope="col">Orbit (days)</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th scope="row">Mercury</th>
      <td>4,880</td>
      <td>0.39</td>
      <td>88</td>
    </tr>
    <tr>
      <th scope="row">Venus</th>
      <td>12,104</td>
      <td>0.72</td>
      <td>225</td>
    </tr>
    <tr>
      <th scope="row">Earth</th>
      <td>12,742</td>
      <td>1.00</td>
      <td>365</td>
    </tr>
    <tr>
      <th scope="row">Mars</th>
      <td>6,779</td>
      <td>1.52</td>
      <td>687</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <th scope="row">Average</th>
      <td>9,126</td>
      <td>0.91</td>
      <td>341</td>
    </tr>
  </tfoot>
</table>

Color schemes#

data-theme="light" or data-theme="dark" can be used at any level: <table>, <thead>, <tbody>, <tfoot>, <tr>, <th>, <td>.

 

PlanetDiam. (km)Dist. to Sun (AU)Grav. (m/s²)
Mercury4,8800.393.7
Venus12,1040.728.9
Earth12,7421.009.8
Mars6,7791.523.7
Average9,1260.916.5
<table>
  <thead data-theme="dark">
    ...
  </thead>
  <tbody>...</tbody>
  <tfoot>...</tfoot>
</table>

Striped table#

.striped enable striped rows (not available in the class‑less version).

PlanetDiam. (km)Dist. to Sun (AU)Grav. (m/s²)
Mercury4,8800.393.7
Venus12,1040.728.9
Earth12,7421.009.8
Mars6,7791.523.7
Average9,1260.916.5
<table class="striped">
  ...
</table>

Edit this page on GitHub