본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

테이블 (Table)

원문 보기 위키 갱신

<table>을 위한 깔끔하고 미니멀한 스타일이에요. 일관된 여백과 최소한의 테두리 없는 느낌을 제공해요.

출처: 문서

본문

<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"나 data-theme="dark"는 <table>, <thead>, <tbody>, <tfoot>, <tr>, <th>, <td> 어디에서든 사용할 수 있어요.

<table>
  <thead data-theme="dark">
    ...
  </thead>
  <tbody>...</tbody>
  <tfoot>...</tfoot>
</table>

줄무늬 테이블 (Striped table)

.striped는 줄무늬 행을 활성화해요 (class-less 버전에서는 사용할 수 없어요).

<table class="striped">
  ...
</table>

더 알아보기 (Learn more)