“Pengindeksan Baris Tabel” Kode Jawaban

Pengindeksan Baris Tabel

body{
  counter-reset: Serial;           /* Set the Serial counter to 0 */
}

table{
  border-collapse: collapse;
}

tr td:first-child:before{
  counter-increment: Serial;      /* Increment the Serial counter */
  content:counter(Serial);        /* Display the counter */
}
Hungry Hyena

Pengindeksan Baris Tabel

<table border="1">
  <thead>
    <tr>
      <th>Automatic Serial number</th>
      <th>Column 1</th>
      <th>Column 2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td></td>
      <td>Column 1</td>
      <td>Column 2</td>
    </tr>
    <tr>
      <td></td>
      <td>Column 1</td>
      <td>Column 2</td>
    </tr>
    <tr>
      <td></td>
      <td>Column 1</td>
      <td>Column 2</td>
    </tr>
    <tr>
      <td></td>
      <td>Column 1</td>
      <td>Column 2</td>
    </tr>
    <tr>
      <td></td>
      <td>Column 1</td>
      <td>Column 2</td>
    </tr>
    <tr>
      <td></td>
      <td>Column 1</td>
      <td>Column 2</td>
    </tr>
    <tr>
      <td></td>
      <td>Column 1</td>
      <td>Column 2</td>
    </tr>
    <tr>
      <td></td>
      <td>Column 1</td>
      <td>Column 2</td>
    </tr>
  </tbody>
</table>
 Run code snippet
Hungry Hyena

Jawaban yang mirip dengan “Pengindeksan Baris Tabel”

Pertanyaan yang mirip dengan “Pengindeksan Baris Tabel”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya