<figure> : <table>요소 바깥을 감싼다

<figcaption> : 요소의 내용 요약



html)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="utf-8">
    <meta name="viewport" 
          content="width=device-width, height=device-height, 
                     minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0">
    <title>Insert title here</title>
</head>
 
<body>
<!--<figure><figcaption> : 테이블의 내용 요약 -->
<figure>
    <figcaption>
        <strong>figcaption</strong>
        <p>테이블의 설명을 작성할 수 있습니다.</p>
    </figcaption>
    <table border="1">    
        <colgroup>
            <col width="20%">
            <col width="40%">
            <col width="*">
        </colgroup>    
        <thead>
            <tr>
                <th scope="col" id="a1"></th>
                <th scope="col" id="a2">header1</th>
                <th scope="col" id="a3">header2</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <th scope="row" id="b1">row 1</th>
                <td headers="a2 b1">data 1-1</td>
                <td headers="a3 b1">data 1-2</td>
            </tr>
            <tr>
                <th scope="row" id="b2">row 2</th>
                <td headers="a2 b2">data 2-1</td>
                <td headers="a3 b2">data 2-2</td>
            </tr>
        </tbody>
        <tfoot>
            <tr>
                <th scope="row" id="re">결과</th>
                <td headers="a2 re">result 1</td>
                <td headers="a3 re">result 2</td>
            </tr>
        </tfoot>
    </table>
</figure>
</body>
</html>
cs



결과)




+ Recent posts