본문 바로가기

bitcamp/HTML&CSS

CSS_연습문제

1. HTML 문서에서 CSS를 이용하여 작성하시오.

<구현 화면>

 

<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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
 <html>
 <head>
 <meta charset="EUC-KR">
 <title></title>
 <style>
     #header {
        width: 500px;
        background-color: #ffd800;
        border: 1px solid #808080;
        text-align: center;
     }
 
    #wrap {
        width: 500px;
        background-color: #66dbf6;
        border: 1px solid #808080;
        text-align: center;
        overflow: hidden;
    }
 
    #content {
        width: 350px;
        border: 1px solid red;
        float: left;
    }
 
    #banner {
        border: 1px solid red;
        float: left;
    }
 
    #footer {
        clear: both;
        width: 500px;
        border: 1px solid #808080;
        background-color: #ffd800;
        text-align: center;
    }
 
    .menu1 {
        color: #1822e2;
        font-weight: bold;
    }
 
    .menu1, .menu3, .menu5 {
        font-size: 20px;
    }
 </style>
 </head>
 <body>
    <div id="header">
        <h1>HEADER</h1>
    </div>
 
    <div id="wrap">
        <div id="content">
            <h1>CONTENT</h1>
            <ul>
                <li class="menu1">menu1</li>
                <li class="menu2">menu2</li>
                <li class="menu3">menu3</li>
                <li class="menu4">menu4</li>
                <li class="menu5">menu5</li>
            </ul>
        </div>
    
        <div id="banner">
            <h1>BANNER</h1>
            <a href="http://www.sba.seoul.kr" target="_blank"><img src="img01.jpg"></a>
        </div>
    </div>
    
    <div id="footer">
        <h1>FOOTER</h1>
    </div>    
 </body>
 </html>
cs

 

2. HTML 문서에서 CSS를 이용하여 작성하시오.

<구현 화면>

 

<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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
 <html>
 <head>
 <meta charset="EUC-KR">
 <title>Insert title here</title>
 <style>
    #header, #content, #footer{
        width: 1400px;
        background-color: #ffffff;
        overflow: hidden;
        margin: 0px outo;
    }
 
    .can_01, .can_03, .can_07, .can_09{
        width: 250px;
        height: 150px;
        border: 1px solid #cccccc;
        background-color: #efefef;
        float:left;
    }
 
    .can_04, .can_06{
        width: 250px;
        height: 300px;
        border: 1px solid #cccccc;
        background-color: #efefef;
        float:left;
    }
 
    .can_02, .can_05, .can_08{
        width: 700px;
        border: 1px solid #cccccc;
        background-color: #efefef;
        float:left;
    }
    
    .can_01, .can_09{
        border-radius: 30px 0 30px 0;
    }
 
    .can_03, .can_07{
        border-radius:0 30px 0 30px;
    }
 
    .can_02{
        height: 150px;
        border-radius:0 0 30px 30px;
    }
 
    .can_04{
        border-radius:0 30px 30px 0;
    }
 
    .can_05{
        border-radius:30px 30px 30px 30px;
        height: 300px;
    }
 
    .can_06{
        border-radius:30px 0 0 30px;
    }
 
    .can_08{
        height: 150px;
        border-radius:30px 30px 0 0;
    }
 
    ul li{
        list-style:none;
        font-size:20px;
        font-weight:bold;
        text-align:center;
        margin: 30px;
        float:left;
    }
 
    h1{
        clear: both;
    }
 </style>
 </head>
 <body>
    <div id="header">        
        <div class="can_01"></div>
        <div class="can_02"></div>
        <div class="can_03"></div>
    </div>
    
    <div id="content">    
        <div class="can_04"></div>
        <div class="can_05">
            <ul>
                <li>menu1</li>  
                <li>menu2</li>  
                <li>menu3</li>  
                <li>menu4</li>  
            </ul>
            <h1>하이서울브랜드</h1>
            <p>서울시와 서울산업진흥원(SBA)이 공동으로 지원하는 하이 서울브랜드 사업을 우수한 기술력<br /> 과 상품력을
            보유하고 있으나 고유브랜드 육성에 어려움을 겪고 있는 우수기업들이 서울시가<br /> 인정한 중소기업 공동브랜드인
            하이서울브랜드를 활용하여 제품 경쟁력을 강화할 수 있도록<br /> 각종 홍보 마케팅을 지원하는 사업입니다.</p>
        </div>
        <div class="can_06"></div>
    </div>
        
    <div id="footer">    
        <div class="can_07"></div>
        <div class="can_08"></div>
        <div class="can_09"></div>
    </div>
 </body>
 </html>
cs

 

3. HTML 문서에서 CSS를 이용하여 작성하시오.

<구현 화면>

 

<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
 <head>
 <meta charset="EUC-KR">
 <title>Insert title here</title>
 <style>
    #nav {
        width: 800px;
        border: 1px solid #cccccc;
        margin: 0 auto;
        overflow: hidden;
        text-align: center;
    }
 
     #nav div {
        width: 150px;
        height: 100px;
        float: left;
        line-height: 100px;
        font-size: 1.5em; 
        border-top : 1px solid #cccccc;
        border-bottom: 1px solid #cccccc;
        text-align: center;
        margin: 5px;
    }
 
    a {
        text-decoration: none;
        color: #282828;
    }
 </style>
 </head>
 <body>
   <div id="nav">
        <div><a href="#">menu1</a></div>
        <div><a href="#">menu2</a></div>
        <div><a href="#">menu3</a></div>
        <div><a href="#">menu4</a></div>
        <div><a href="#">menu5</a></div>
    </div>
 </body>
cs

 

4. HTML 문서에서 CSS를 이용하여 작성하시오.

<구현 화면>

 

<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
 <head>
 <meta charset="EUC-KR">
 <title>Insert title here</title>
 <style>
    div{
        width:800px;
        margin:0 auto;
        border:1px solid #cccccc;
        padding:10px;
        overflow:hidden;
    }
    div p:nth-child(1) {
        font-size:2.0em;
        text-align:center;
        text-decoration:underline;
        height:100px;
        line-height:100px;
    }
    div p:nth-child(2) {
        text-align:left;
        font-size:1.2em;
    }
    div p:nth-child(4) {
        text-align:right;
    }
    div p:nth-child(6) {
        font-size:1.5em;    
        height:50px;
        line-height:50px;
        text-align:center;
    }
    div p:nth-child(6) a {
        text-decoration: none;
        color: #282828;
    }
 </style>
 </head>
 <body>
    <div>
        <p>HTML5, CSS3 Document</p>
        <p>To. all member</p>
        <p>html5, CSSS study is very easy</p>
        <p>Form. SBA</p>
        <hr/>
        <p><a href="http://www.sba.seoul.kr" target="_blank">서울산업진흥원</a></p>    
    </div>
 </body>
cs

 

5. HTML 문서에서 CSS를 이용하여 작성하시오.

<구현 화면>

<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
<head>
 <meta charset="EUC-KR">
 <title>Insert title here</title>
 <style>
    #wrap{
        border: 1px solid #282828;
        width:800px;
        height:550px;
        padding:0 0 2px 2px;
    }
    
    #content{
        border: 1px solid #cccccc;
    }
        
    div p:nth-child(1) {
        border:1px solid #cccccc;
        width:780px;
        height:70px;
        line-height:70px;
        margin-left:10px;
        font-size:3.0em;
        color: green;
    }
    
    img{
        width:600px;
        height:250px;
        margin-left:10px;
    }
 </style>
 </head>
 <body>
    <div id="wrap">
        <div id="content">
            <p>세계 3대 미항</p>
            <p><img src="http://www.obsnews.co.kr/news/photo/201904/1153128_357045_5944.jpg"></p>
            <p>시드니(Sydney), 호주</p>
            <p>리우데자네이루(Rio de Janeiro), 브라질</p>
            <p>나폴리(Naples), 이탈리아</p>
        </div>
    </div>
 </body>
cs

 

6. HTML 문서에서 CSS를 이용하여 작성하시오.

<구현 화면>

 

<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
 <head>
 <meta charset="EUC-KR">
 <title>Insert title here</title>
 <style>
    #header{
      width:800px;
      height:80px;
      background-color:green;
    }
   #content{
      overflow:hidden;
   }
   #content .left{
      width:150px;
      height:600px;
      background-color:yellow;
      float:left;
   }
   #content .center{
      width:500px;
      height:600px;
      background-color:red;
      float:left;
   }
   #content .right{
      width:150px; height:600px;
      background-color:grey;
      float:left;
    }
    #footer{
      width:800px;
      height:60px;
      background-color:blue;
    }
 </style>
 </head>
 <body>
   <div id="header">헤더</div>
   <div id="content">
      <div class="left">컨텐츠LEFT</div>
      <div class="center">컨텐츠CENTER</div>
      <div class="right">컨텐츠RIGHT</div>
   </div>
   <div id="footer">푸터</div>
 </body>
cs

 

 

7. HTML 문서에서 CSS를 이용하여 작성하시오.

<구현 화면>

 

<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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
 <head>
 <meta charset="EUC-KR">
 <title>Insert title here</title>
 <style>
    #wrap {
        border: 1px solid #cccccc;
        width: 800px;
        height: 700px;
        text-align: center;
        padding: 7px;
    }
    #header {
        border: 1px solid #cccccc;
        line-height: 100px;
        margin-bottom: 5px;
    }
    #nav, #content, #footer {
        border: 1px solid #cccccc;
        margin-bottom: 5px;
    }
    #nav ul, #content {
        overflow: hidden;
    }
    #nav ul li {
        border: 1px solid #cccccc;
        list-style: none;
        float: left;
        width: 140px;
        line-height: 40px;
    }
    #content .left {
        border: 1px solid #cccccc;
        width: 570px;
        height: 340px;
        float: left;
        margin: 7px;
    }
    #content .right {
        border: 1px solid #cccccc;
        width: 195px;
        height: 340px;
        float: left;
        margin: 7px;
    }
    #footer {
        line-height: 110px;
    }
 </style>
 </head>
 <body>
    <div id="wrap">
        <div id="header">HEADER</div>
 
        <div id="nav">
            <p>NAVIGATION</p>
            <ul>
                <li>menu1</li>
                <li>menu2</li>
                <li>menu3</li>
                <li>menu4</li>
                <li>menu5</li>
            </ul>
        </div>
 
        <div id="content">
            <p class="left">CONTENT</p>
            <p class="right">BANNER</p>
        </div>
 
        <div id="footer">FOOTER</div>
    </div>
 </body>
cs

'bitcamp > HTML&CSS' 카테고리의 다른 글

CSS  (0) 2021.02.08
HTML_연습문제  (0) 2021.02.08
HTML  (0) 2021.02.07