실습문제 4-5

WEB/TRAINNING 2017. 11. 4. 19:26 |

5. HTML 태그를 수정하지 말고 셀렉터와 스타일 시트를 삽입하여 다음과 같이 출력되게 하라.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE html>
<html>
<head>
    <title>셀렉터</title>
</head>
<body class="main">
    <h3>얼굴</h3>
    <hr>
    <div id="center"><strong>박인희</strong></div>
    <div class="indent">
        <p><em>길</em>을 걷고 산들 무엇하리
            <strong>꽃</strong>이 내가 아니듯 내가
            <strong>꽃</strong>이 될 수 없는 지금..</p>
    </div>
 
</body>
</html>
cs






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
<!DOCTYPE html>
<html>
<head>
    <title>셀렉터</title>
    <style>
        body /* body.main */
        {
            background-color: powderblue;
        }
        h3, em
        {
            color : green; 
        }
        h3
        {
            font-size : 25px;
        }
        #center
        {
            text-align : center;
        }
        #center strong
        {
            color : blue; /* div > strong */
            background : yellow;
        }
        strong /* div strong */
        {
            color : red;
        }
        .indent
        {
               text-indent : 3em;
        }
    
    </style>
</head>
<body class="main">
    <h3>얼굴</h3>
    <hr>
    <div id="center"><strong>박인희</strong></div>
    <div class="indent">
        <p><em>길</em>을 걷고 산들 무엇하리
            <strong>꽃</strong>이 내가 아니듯 내가
            <strong>꽃</strong>이 될 수 없는 지금...</p>
    </div>
 
</body>
</html>
 
cs

 

'WEB > TRAINNING' 카테고리의 다른 글

실습문제 4-7  (0) 2017.11.04
실습문제 4-6  (0) 2017.11.04
실습문제 4-4  (0) 2017.11.04
실습문제 4-3  (0) 2017.11.04
실습문제 4-2  (0) 2017.11.04
Posted by 너래쟁이
: