colgroup, col

테이블 내 컬럼의 그룹 요소를 정의하는데 유용하게 사용 할 수 있다.

 

<table style="width: 100%">

    <colgroup>

        <col width="20%">

        <col width="20%">

        <col width="20%">

        <col width="20%">

        <col width="20%">

    </colgroup>

    <tbody id="my_tbody">

        <tr>

            <td>가</td>

            <td>나</td>

            <td>다</td>

            <td>라</td>

            <td>마</td>

        </tr>

    </tbody>

</table>

 

 

출처>

colgroup:

The HTML <colgroup> element defines a group of columns within a table.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup

 

col

The HTML <col> element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a <colgroup> element.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col

 

728x90

+ Recent posts