๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
HTML

๊ตฌ์กฐ ๊ด€๋ จ ์š”์†Œ

by Youcodein 2022. 8. 17.
728x90
๋ฐ˜์‘ํ˜•

 

๊ตฌ์กฐ ๊ด€๋ จ ์š”์†Œ

<header>, <section>, <footer>, <nav>, <article>, <aside>

์š”์†Œ ์œ ํ˜• ํƒœ๊ทธ๋ช… ํƒœ๊ทธ์˜ ์˜๋ฏธ ๋ฐ ํŠน์ง•
๋ธ”๋ก ๋ ˆ๋ฒจ ์š”์†Œ <header></header> 1. HTML๋ฌธ์„œ์˜ ํ—ค๋” ์˜์—ญ์„ ์˜๋ฏธํ•˜๋Š” ํƒœ๊ทธ๋กœ ์ œ๋ชฉ์ด๋‚˜ ๋‚ด๋น„๊ฒŒ์ด์…˜, ๊ฒ€์ƒ‰ ๋“ฑ์˜ ๋‚ด์šฉ๋“ค์„ ํฌํ•จํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
2. ํ…์ŠคํŠธ, ์ธ๋ผ์ธ ์š”์†Œ, ๋ธ”๋ก ๋ ˆ๋ฒจ ์š”์†Œ๋ฅผ ํฌํ•จํ•  ์ˆ˜ ์žˆ์ง€๋งŒ <header><footer> ํƒœ๊ทธ๋Š” ํฌํ•จํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
<section></section> 1. HTML ๋ฌธ์„œ์—์„œ ๋งฅ๋ฝ์ด ๊ฐ™์€ ์š”์†Œ๋“ค์„ ์ฃผ์ œ๋ณ„๋กœ ๊ทธ๋ฃนํ™”ํ•ด์ฃผ๋Š” ํƒœ๊ทธ์ด๋ฉฐ ์„น์…˜ ์ฃผ์ œ์— ๋Œ€ํ•œ ์ œ๋ชฉ ์š”์†Œ (<h2>~<h6>)ํƒœ๊ทธ๋ฅผ ํฌํ•จํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.
2. ํ…์ŠคํŠธ, ์ธ๋ผ์ธ ์š”์†Œ, ๋ธ”๋ก ๋ ˆ๋ฒจ ์š”์†Œ๋ฅผ ํฌํ•จํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
<footer></footer> 1. HTML ๋ฌธ์„œ์˜ ํ‘ธํ„ฐ ์˜์—ญ์„ ์˜๋ฏธํ•˜๋Š” ํƒœ๊ทธ๋กœ ์„น์…˜ ์ž‘์„ฑ์ž๋‚˜ ์ €์ž‘๊ถŒ์— ๋Œ€ํ•œ ์ •๋ณด, ๊ด€๋ จ๋œ ๋ฌธ์„œ์˜ ๋งํฌ๋ฅผ ํฌํ•จํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
2. ํ…์ŠคํŠธ, ์ธ๋ผ์ธ ์š”์†Œ, ๋ธ”๋ก ๋ ˆ๋ฒจ ์š”์†Œ๋ฅผ ํฌํ•จํ•  ์ˆ˜ ์žˆ์ง€๋งŒ <header><footer> ํƒœ๊ทธ๋Š” ํฌํ•จํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
<nav></nav> 1. HTML ๋ฌธ์„œ์˜ ๋ฉ”์ธ ๋ฉ”๋‰ด๋‚˜ ๋ชฉ์ฐจ ๋“ฑ์„ ์ •์˜ํ•ด ์ฃผ๋Š” ํƒœ๊ทธ์ž…๋‹ˆ๋‹ค.
2. ํ…์ŠคํŠธ, ์ธ๋ผ์ธ ์š”์†Œ, ๋ธ”๋ก ๋ ˆ๋ฒจ ์š”์†Œ๋ฅผ ํฌํ•จํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
<article></article> 1. HTML ๋ฌธ์„œ ๋‚ด์—์„œ ๋…๋ฆฝ์ ์œผ๋กœ ๋ฐฐํฌ ๋˜๋Š” ์žฌ์‚ฌ์šฉ์ด ๊ฐ€๋Šฅํ•œ ๊ฒŒ์‹œ๋ฌผ, ๋‰ด์Šค ๊ธฐ์‚ฌ, ๋ธ”๋กœ๊ทธ ํฌ์ŠคํŒ… ๋“ฑ์„ ์˜๋ฏธํ•˜๋Š” ํƒœ๊ทธ์ด๋ฉฐ ์ œ๋ชฉ ์š”์†Œ (<h2>~<h6>)ํƒœ๊ทธ๋ฅผ ํฌํ•จํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.
2. ํ…์ŠคํŠธ, ์ธ๋ผ์ธ ์š”์†Œ, ๋ธ”๋ก ๋ ˆ๋ฒจ ์š”์†Œ๋ฅผ ํฌํ•จํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
<aside></aside> 1. ๋ฉ”์ธ ์ฝ˜ํ…์ธ ์™€ ์ง์ ‘์ ์œผ๋กœ ๊ด€๋ จ์ด ์—†๋Š” ์˜์—ญ์„ ์˜๋ฏธํ•˜๋Š” ํƒœ๊ทธ์ด๋ฉฐ HTML ๋ฌธ์„œ์˜ ์˜ค๋ฅธ์ชฝ์ด๋‚˜ ์™ผ์ชฝ์˜ ์‚ฌ์ด๋“œ ๋ฉ”๋‰ด๋‚˜ ๊ด‘๊ณ  ๋“ฑ์˜ ์˜์—ญ์œผ๋กœ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.
2. ํ…์ŠคํŠธ, ์ธ๋ผ์ธ ์š”์†Œ, ๋ธ”๋ก ๋ ˆ๋ฒจ ์š”์†Œ๋ฅผ ํฌํ•จํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์˜ˆ์ œ 1-14

์˜ˆ์ œ 1-14๋ฅผ ๋”ฐ๋ผํ•˜๋ฉฐ ๊ตฌ์กฐ๋ฅผ ์ตํ˜€๋ด…๋‹ˆ๋‹ค.

figma ๋ ˆ์ด์•„์›ƒ

HTML ์†Œ์Šค

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

<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>๊ตฌ์กฐ ์š”์†Œ</title>

</head>

<body>
    <section class="container">
        <header class="header">
            <div class="logo1">
                <h1>h1</h1>
                <p><a href="#">๋ฐ˜์‘ํ˜•์›น</a></p>
            </div>

            <div class="menu">
                <h2>header</h2>
                <nav class="nav">
                    <h2>nav</h2>
                    <ul>
                        <li><a href="#">MENU01</a></li>
                        <li><a href="#">MENU02</a></li>
                        <li><a href="#">MENU03</a></li>
                        <li><a href="#">MENU04</a></li>
                        <li><a href="#">MENU05</a></li>
                    </ul>
                </nav>
            </div>
        </header>
        <div class="contents">
            <section class="cont1">
                <h3>section</h3>
                <h2>์ฝ˜ํ…์ธ  ๊ทธ๋ฃน 01</h2>
            </section>
            <section class="cont2">
                <h3>section</h3>
                <h2>์ฝ˜ํ…์ธ  ๊ทธ๋ฃน 02</h2>
            </section>
            <article class="article">
                <h3>article</h3>
                <p>์ฃผ์š” ๊ธฐ์‚ฌ</p>
            </article>
            <aside class="aside">
                <h3>aside</h3>
                <p>๊ด‘๊ณ </p>
            </aside>
        </div>
        <footer class="footer">
            <h2>footer</h2>
            <div class="box">
                <div class="address">
                    <h3>address</h3>
                    <p>๊ฒฝ๊ธฐ๋„ ๋ถ€์ฒœ์‹œ ์˜ค์ •๊ตฌ ์‚ผ์ •๋™ 032)674-5685 icoxpub@naver.com</p>
                </div>
                <div class="p">
                    <h3>p</h3>
                    <p>COPYRIGHT โ“’ALL rights reserved.</p>
                </div>
            </div>
        </footer>
    </section>
</body>

</html>

CSS ์†Œ์Šค

/* fonts */
@import url('https://webfontworld.github.io/gmarket/GmarketSans.css');

/* ๋ฆฌ์…‹ */
/* ์—ฌ๋ฐฑ ์ดˆ๊ธฐํ™” */
* {
    margin: 0 auto;
    padding: 0;
    font-family: 'GmarketSans';
}

/* ๋งํฌ ์ดˆ๊ธฐํ™” */
a {
    text-decoration: none;
    color: #222;
}

/* ๋ชฉ๋ก ์ดˆ๊ธฐํ™” */
li {
    list-style: none;
}

/* ์ œ๋ชฉ ์ดˆ๊ธฐํ™” */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: normal;
    font-size: 16px;
    text-align: center;
}

/* ๊ธฐ์šธ๊ธฐ ์ดˆ๊ธฐํ™” */
em,
i {
    font-style: normal;
}

/* ํ…Œ์ด๋ธ” ์ดˆ๊ธฐํ™” */
table {
    width: 100%;
    border-spacing: 0;
    border-collapse: collapse;
}

/* container */
body {}

.container {
    width: 1200px;

    margin: 0 auto;

}

/* header */
header {
    width: 1200px;
    height: 140px;
    background-color: #47a5ba;
    display: flex;
}

.logo1 {
    width: 100px;
    height: 100px;
    text-align: center;
    background-color: #d9d9d9;
    margin: 20px;
}

.logo1>h1 {
    width: 78px;
    height: 30px;
    background-color: #c87474;
    color: #000;
    line-height: 30px;
}

.logo1>p {
    margin-top: 20px;
}

.menu {
    position: relative;
}

.menu>h2 {
    width: 78px;
    height: 30px;
    background-color: #c87474;
    color: #000;
    line-height: 30px;
    margin-top: 20px;
}

.manu>p {
    width: 942px;
    height: 40px;
    background-color: #d9d9d9;
}

.nav {
    width: 942px;
    height: 40px;
    line-height: 40px;
    background-color: #d9d9d9;
    box-sizing: border-box;
    margin: 30px 0 0 0;
}

.nav>h2 {
    width: 78px;
    height: 30px;
    background-color: #c87474;
    position: absolute;
    top: 80px;
    line-height: 30px;

}

.nav ul {
    display: flex;
    padding: 0 0 0 180px;
}

.nav ul li {
    justify-content: space-between;
}

/* contents */
.contents {
    width: 1200px;
    height: 611px;
    background-color: #47a5ba;
    margin: 20px 0 20px 0;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    position: relative;

}

.cont1 {
    width: 373px;
    height: 560px;
    background-color: #b3eeea;
    position: relative;
}

.cont1>h2 {
    line-height: 560px;
}

.cont1>h3 {
    width: 78px;
    height: 30px;
    background-color: #c87474;
    line-height: 30px;
    position: absolute;
    top: 30px;
}

.cont2 {
    width: 373px;
    height: 560px;
    background-color: #b3eeea;
    position: relative;
}

.cont2>h2 {
    line-height: 560px;
}

.cont2>h3 {
    width: 78px;
    height: 30px;
    background-color: #c87474;
    line-height: 30px;
    position: absolute;
    top: 30px;

}

.article {
    width: 373px;
    height: 270px;
    background-color: #b3eeea;
    text-align: center;
}


.article>h3 {
    width: 78px;
    height: 30px;
    background-color: #c87474;
    line-height: 30px;
    position: absolute;
    top: 30px;
}

.article>p {
    line-height: 270px;
}

.aside {
    width: 373px;
    height: 270px;
    background-color: #b3eeea;
    position: absolute;
    left: 800px;
    top: 310px;
    text-align: center;
}

.aside>h3 {
    width: 78px;
    height: 30px;
    background-color: #c87474;
    line-height: 30px;
    position: absolute;
    top: 30px;
}

.aside>p {
    line-height: 270px;
}

/* footer */
footer {
    width: 1200px;
    height: 120px;
    background-color: #47a5ba;
    position: relative;
    padding: 15px 0 15px 0;
    box-sizing: border-box;
    position: relative;
}

footer>h2 {
    width: 78px;
    height: 30px;
    background-color: #c87474;
    line-height: 30px;
    position: absolute;
}

.box {
    position: absolute;
    left: 118px;
}

.address {
    width: 667px;
    height: 40px;
    background-color: #d9d9d9;
    margin-bottom: 5px;
    text-align: center;
    line-height: 40px;

}

.address > h3 {
    width: 78px;
    height: 30px;
    background-color: #c87474;
    line-height: 30px;
    position: absolute;
}

.p > h3 {
    width: 78px;
    height: 30px;
    background-color: #c87474;
    line-height: 30px;
    position: absolute;
}

.p {
    width: 667px;
    height: 40px;
    background-color: #d9d9d9;
    text-align: center;
    line-height: 40px;
}
728x90
๋ฐ˜์‘ํ˜•

'HTML' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

๋ธ”๋ก ๊ตฌ์กฐ / ์ธ๋ผ์ธ ๊ตฌ์กฐ  (2) 2022.08.22
์›น ์ ‘๊ทผ์„ฑ/์›น ํ˜ธํ™˜์„ฑ  (5) 2022.08.09

๋Œ“๊ธ€