CSS입문

CSS_연습문제

양빵빵 2022. 4. 8. 17:53

 

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        section {
            margin-top: 30px;
            margin-left: 30px;
            border: 4px double #123456;    
            width: 550px;
        }
        h1{
            background: #abcdef;
            text-align: center;
            font-weight: bold;
            border-bottom: 2px solid #000;
            padding: 15px 0;
        }
       
        .title {
            border: 1px solid #000;
        }
        h2{
            font-size: 25;
            font-weight: bold;
            padding-top: 15px;
        }
        p{
            font-size: 14px;
            padding-bottom: 15px;
        }
       
    </style>
</head>

<body>


    <section>
        <h1>속담풀이</h1>
        <div class="title t1">
            <h2>말 한마디에 천냥 빚진다.</h2>
            <p>생각해보지 않고 나오는 대로 말하다가 실수하면 상대의 마음에 아픔을 남기게 된다.</p>

        </div>
        <div class="title">
            <h2>웃는 얼굴에 침 못뱉는다.</h2>
            <p>호의적인 의사소통 방법은 자기 말만 하는 것보다 좋은 결과로 이어진다.</p>

        </div>

    </section>
</body>

</html>