DAY 11 - HTML#3 테이블 실습

Min·2023년 8월 8일
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>html실습문제 1번</title>
</head>
<body>
    <table border= "1" width="400px" height="200px">
        <tr>
            <td valign=middle align=center bgcolor="red">1행 1열</td>
            <td valign=middle align=center bgcolor="yellow">1행2열</td>
            <td valign=middle align=center bgcolor="yellow">1행 3열</td>
        </tr>
        <td valign="top" align="left" bgcolor="yellow">2행 1열</td>
        <td bgcolor="yellow">2행2열</td>
        <td valign=bottom align=left bgcolor="yellow">2행 3열</td>

</body>
</html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>html실습문제 2번</title>
</head>
<body>
    <style>
        table, tr, th, td { 
            border:2px solid #222; 
            border-collapse:collapse;
            margin-left:auto;
            margin-right:auto;
        }
        h1{
            text-align: center;
        }
    </style>
    <h1>Site map</h1>
    <table border= "1" bgcolor="white">
            <th bgcolor="#A9F5F2" width="100px" height="50px">소개</th>
            <th bgcolor="#A9F5F2" width="100px" height="50px">영화</th>
            <th bgcolor="#A9F5F2" width="100px" height="50px">음악</th>
    <tr>
        <td valign=top align=left width="160px" height="50px">
            <ul>
            <li>주인장소개</li>
            <li>가족소개</li>
            <li>친구소개</li>
            <li>홈페이지소개</li>
            </ul>
        </td>
        <td valign=top align=left width="160px" height="50px">
            <ul>
            <li>추억의영화</li>
            <li>최근에본영화</li>
            <li>영화포스터모음</li>
            </ul>
        </td>
        <td valign=top align=left width="160px" height="50px">
            <ul>
            <li>음악감상실</li>
            <li>The Real Group</li>
            <li>음악자료실</li>
            </ul>
        </td>
    </tr>
        </td>
            <th bgcolor="#A9F5F2" width="100px" height="50px">갤러리</th>
            <th bgcolor="#A9F5F2" width="100px" height="50px">게시판</th>
            <th bgcolor="#A9F5F2" width="100px" height="50px">동호회</th>
        <tr>
            <td valign=top align=left width="160px" height="50px">
                <ul>
                <li>장나라</li>
                <li>소유진</li>
                <li>김희선</li>
                <li>정우성</li>
                <li>장국영</li>
                <li>장동건</li>
                </ul>
            </td>
            <td valign=top align=left width="160px" height="50px">
                <ul>
                <li>자유게시판</li>
                <li>방명록</li>
                <li>묻고답하기</li>
                </ul>
            </td>
            <td valign=top align=left width="160px" height="50px">
                <ul>
                <li>우주에</li>
                <li>산악회</li>
                <li>춤바람</li>
                </ul>
            </td>
        </tr>
        </table>
</body>
</html>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>html실습문제 3</title>
</head>
<body>
    <table>
    <th bgcolor="orange" colspan="2" height="50px" align="left">
        <big><big><big><big><big><big></big>Main Title of Web Page
    </th>
    <tr>
        <td bgcolor="#D7DF01" width="100px" valign="top">
        <b>Menu</b><br>
        HTML<br>
        CSS<br>
        JavaScript<br>
    </td>
    <td width="500px" height="200px" colspan="" valign="top" align="left">
        Content goes here
    </td>
    <tr>
    <td bgcolor="#FFBF00" width="200px" colspan="3" valign="middle" align="center">
        Copyright 2013 Lust.com
    </td>
    </tr>
    
    </table>
</body>
</html>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>html실습문제 4</title>
</head>
<body>
    <style>
        table, tr, th, td { border:1px solid #222; border-collapse:collapse; }
    </style>
    <table>
            <th rowspan="2">구분</th>
            <th colspan="3">내행성</th>
            <th colspan="5">외행성</th>
            <tr>

                <th>수성</th><th>금성</th><th>지구</th><th>화성</th><th>목성</th><th>토성</th><th>천성</th><th>해성</th>
            </tr>
            <tr>
                <th>지름비</th>
                <td>0.383</td><td>0.949</td><td>1.000</td><td>0.532</td><td>11.209</td><td>9.449</td><td>4.007</td><td>3.883</td>
            </tr>
    </table>
</body>
</html>

1개의 댓글

comment-user-thumbnail
2023년 8월 8일

개발자로서 성장하는 데 큰 도움이 된 글이었습니다. 감사합니다.

답글 달기