practice3.html 1.3 KB
<html>
<meta charset="utf-8">
<title>실습3</title>
  <body>
    <table border="1">
    <!--표의 제목같은 역할-->
    <thead>
      <tr>
      <th>분류</th>
      <th>제품명</th>
      <th>단가</th>
      <th>수량</th>
      <th>금액</th>
      </tr>
    </thead>
    <!--표의 제목같은 역할-->

    <!--공산품-->
    <tbody>
      <tr>
      <td rowspan="3">공산품</td>
      <td>iPhone</td>
      <td>900,000</td>
      <td>2</td>
      <td>1,800,000</td>
      </tr>

      <tr>
      <td>LED TV</td>
      <td>3,000,000</td>
      <td>3</td>
      <td>9,000,000</td>
      </tr>

      <tr>
      <td colspan="3">소계</td>
      <td>10,800,000</td>
      </tr>
      <!--공산품-->

      <!--농산품-->
      <tr>
      <td rowspan="2">농산품</td>
      <td>인삼</td>
      <td>10,000</td>
      <td>200</td>
      <td>2,000,000</td>
      </tr>

      <tr>
      <td colspan="3">소계</td>
      <td>2,000,000</td>
      </tr>
      <!--농산품-->

      <!--합계-->
      <tr>
      <td colspan="4">합계</td>
      <td>12,800,000</td>
      </tr>
      <!--합계-->
    </tbody>

    <!--합계 (두꺼운글자로 나옴)
      <tfoot>
      <tr>
      <th colspan="4">합계</th>
      <th>12,800,000</th>
      </tr>
    </tfoot>
    합계-->
  </table>
  </body>
</html>