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

[HTML] ๊ตฌ์„ฑ ๊ด€๋ จ ์š”์†Œ

by _ํ† ๋งคํ†  2022. 8. 16.
728x90

HTML : ๊ตฌ์กฐ ๊ด€๋ จ ์š”์†Œ = ์‹œ๋ฉ˜ํ‹ฑ ํƒœ๊ทธ

์‹œ๋ฉ˜ํ‹ฑ ํƒœ๊ทธ๋ž€ ํ•ด์„ ๊ทธ๋Œ€๋กœ ์˜๋ฏธ๊ฐ€ ์žˆ๋Š” ํƒœ๊ทธ๋กœ๋„ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ฆ‰ ๊ตฌ์กฐ๋ฅผ ๋‚˜ํƒ€๋‚ด๋Š” ํƒœ๊ทธ๋กœ ์ •๋ณด๋ฅผ ๊ตฌ์ฒด์ ์œผ๋กœ ์„ ์–ธํ•˜์—ฌ ์›นํ‘œ์ค€๊ณผ ์ ‘๊ทผ์„ฑ์„ ์ค€์ˆ˜ํ•˜๊ธฐ ์œ„ํ•œ ํƒœ๊ทธ์ด๊ธฐ๋„ ํ•ฉ๋‹ˆ๋‹ค.
๋จผ์ € ๊ตฌ์กฐ ์š”์†Œ๊ฐ€ ์–ด๋–ค ๊ฒƒ์ด ์žˆ๋Š”์ง€ ์‚ดํŽด๋ณธ ํ›„ ์‹œ๋ฉ˜ํ‹ฑ ํƒœ๊ทธ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ ˆ์ด์•„์›ƒ์„ ๊ตฌ์„ฑํ•ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.


๊ตฌ์กฐ ๊ด€๋ จ ์š”์†Œ(=์‹œ๋ฉ˜ํ‹ฑ ํƒœ๊ทธ)

๊ตฌ์กฐ ๊ด€๋ จ ์š”์†Œ์—๋Š” <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. HTML

๋‹ค์Œ์€ ์œ„ ์š”์†Œ๋“ค๋กœ HTML ๋งˆํฌ์—…์„ ํ•ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค!

<div id="wrap" class="container score">
    <header id="header" class="header__box">
        <h1>๋ฐ˜์‘ํ˜• ์›น</h1>
        <nav>
            <ul>
                <li><a href="#"></a>๋ฉ”๋‰ด01</li>
                <li><a href="#"></a>๋ฉ”๋‰ด02</li>
                <li><a href="#"></a>๋ฉ”๋‰ด03</li>
                <li><a href="#"></a>๋ฉ”๋‰ด04</li>
                <li><a href="#"></a>๋ฉ”๋‰ด05</li>
            </ul>
        </nav>
    </header>
    <main id="main" class="main__box">
        <div class="section__box">
            <section class="st01">
                <h2>์ฝ˜ํ…์ธ  ๊ทธ๋ฃน01</h2>
            </section>
            <section class="st02">
                <h2>์ฝ˜ํ…์ธ  ๊ทธ๋ฃน02</h2>
            </section>
        </div>
        <div class="article__box">
            <article>
                <h2>์ฃผ์š” ๊ธฐ์‚ฌ</h2>
            </article>
            <aside>๊ด‘๊ณ </aside>
        </div>
    </main>
    <footer id="footer" class="footer__box">
        <div class="footer__main">
            <address>๊ฒฝ๊ธฐ๋„ XXX XXXX 031)000-0000 honggildong@naver.com</address>
            <p>COPYRIGHT ยฉ All rights reserved.</p>
        </div>
    </footer>
</div>

#2. css

๋งˆํฌ์—…์— ์Šคํƒ€์ผ์„ ๋ถ€์—ฌํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค!
์•„์ง ๋ฏธ์ˆ™ํ•˜๋‹ˆ ๊ทธ์ € ์ฐธ๊ณ ๋งŒ ํ•ด์ฃผ์„ธ์š”!

@import url('https://webfontworld.github.io/score/SCoreDream.css');

.score {
    font-family: 'SCoreDream';
    font-weight: 400;
    font-size: 18px;
}

/* reset */
* {
    margin: 0;
    padding: 0;
}

h1, h2, h3 {
    font-weight: normal;
    font-size: 18px;
}

ul {
    list-style: none;
}

ul a {
    text-decoration: none;
    color: #000;
}

/* container */
.container {
    width: 1200px;
    height: 1060px;
    margin: 0 auto;
    background: #eee;
}

.container .header__box {
    width: 100%;
    height: 200px;
    background-color: #d7c8d5;
    display: flex;
}
.container .header__box h1 {
    display: inline-block;
    width: 140px;
    height: 140px;
    margin: 30px 30px;
    background-color: #be9bbb;
    text-align: center;
    line-height: 140px;
}

.container .header__box nav {
    width: 970px;
    height: 70px;
    line-height: 70px;
    text-align: center;
    margin: 100px 30px 30px;
    background-color: #be9bbb;
}

.container .header__box nav ul li {
    margin: 0 50px;
    display: inline-block;
    justify-content: space-between;
}

/* main */
.container .main__box {
    box-sizing: border-box;
    height: 600px;
    background-color: #d7c8d5;
    margin-top: 30px;
    padding-top: 30px;
    display: flex;
    justify-content: space-evenly
}
.container .main__box section {
    width: 400px;
    height: 540px;
    text-align: center;
    line-height: 540px;
    background-color: #be9bbb;
}
.container .main__box .section__box {
    display: flex;
}
.container .main__box .section__box .st01 {
    margin-right: 30px;
}
.container .main__box .article__box {
    text-align: center;
    line-height: 255px;
}
.container .main__box article {
    width: 280px;
    height: 255px;
    margin-bottom: 30px;
    background-color: #be9bbb;
}
.container .main__box aside {
    width: 280px;
    height: 255px;
    background-color: #be9bbb;
}

/* footer */
.container .footer__box {
    height: 200px;
    background-color: #d7c8d5;
    margin-top: 30px;
    display: flex;
    justify-content: right;
}
.container .footer__box .footer__main {
    justify-content: center;
    margin: 30px;
    height: 200px;
    line-height: 200px;
}
.container .footer__main > address {
    width: 970px;
    height: 65px;
    margin: 0 0 10px;
    line-height: 70px;
    text-align: center;
    background-color: #be9bbb;
}
.container .footer__main > p {
    width: 970px;
    height: 65px;
    line-height: 70px;
    text-align: center;
    background-color: #be9bbb;
}

๊ฒฐ๊ณผ๋ณด๊ธฐ

728x90

๋Œ“๊ธ€


Lucky Charms Rainbow
js
html
css