CSS๐ง/css table ํ๊ด๋ จ
html/css table ํ๋ง๋ค๊ธฐ
hyojinny
2022. 9. 30. 14:46
<table> : ํ๋ง๋ค๊ธฐ
<caption> : ํ์ ์ ๋ชฉ ์ง์ ํ์
<thead> : table ์ฒซ๋ฒ์งธ ํ๋ถ๋ฅ ํ์ ์ ๋ชฉ ์ง์ (tr๋ก ์ ๋ชฉ์ด ์์ฑ>th ์นธ์ ์ ๋ชฉ์์ฑ)
<tbody> : table์ body ์๋ต๊ฐ๋ฅ
<th> : table head ํ์์นธ ์ ๋ชฉ / ์ค์์ ๋ ฌ
<tr> : table row ์ด (๊ฐ๋ก์ค) / ์ผ์ชฝ์ ๋ ฌ
<td> : table data ์ (๋ด์ฉ) / ์ผ์ชฝ์ ๋ ฌ (tr์ ํ์์์ฑ)
th : ์ ๋ชฉ <table>
<caption>ํ์ ์ ๋ชฉ ํ์</caption>
<thead>ํ ํ์ ์ ๋ชฉ
<tr> ํ์ ์ด
ํ์์นธ (์ ๋ชฉ)
<th>์ ๋ชฉ</th>
</tr>
</thead>
|
||
tr : ์ด ์์ฑ td:๋ด์ฉ | td:๋ด์ฉ | td:๋ด์ฉ |
์ค์ต
๊ธด์ ๋ชฉ ๋ง์ค์ํ์
.board_list_wrap .link {
white-space: nowrap;
max-width: 90%;
display: inline-block;
text-overflow: ellipsis;
overflow: hidden;
}
์ ๋ชฉ ๋์ด์์ญ
.board_list_wrap thead .col01 {width: 10%;}
.board_list_wrap thead .col03 {width: 15%;}
<tr>
<th class="col01" scope="col">๋ฒํธ</th>
<th class="col02" scope="col">์ ๋ชฉ</th>
<th class="col03" scope="col">์ฒจ๋ถํ์ผ</th>
</tr>
scope="col"
์๊ฐ์ฅ์ ์ธ์ฉ
๋ฒ์๋ผ๋ ๋ป col ์ง์ ์
ํ
๋ฒํธ ์ ๋ชฉ ์ฒจ๋ถํ์ผ ์ฐจ๋ก๋๋ก ์ฝ์
ํ ์ด๋ธ์ ์ง์ ํด์ค์ผ ์ ๊ทผ์ฑ ์ ๋๋ก ์ ์ฉ