๊ตฌ์กฐ ๊ด๋ จ ์์
๊ธฐ์กด HTML์์๋ ์ฝํ ์ธ ์ ๊ตฌ์กฐ๋ฅผ ๊ตฌ๋ถํ ์ ์๋ ์๋ฉํฑํ ์์๊ฐ ์ ๊ณต๋์ง ์์์ง๋ง, HTML5์์๋ ๊ตฌ์กฐ๋ฅผ ์ค๊ณํ ์ ์๋ main, nav, section, article, aside, header, footer ๋ฑ ๋ค์ํ ๊ตฌ์กฐ ๊ด๋ จ ์์๊ฐ ์๋กญ๊ฒ ์ถ๊ฐ๋์์ต๋๋ค.
๊ตฌ์กฐ ๊ด๋ จ ์์
์์ ์ ํ | ํ๊ทธ๋ช | ํ๊ทธ์ ์๋ฏธ ๋ฐ ํน์ง |
---|---|---|
๋ธ๋ก ๋ ๋ฒจ ์์ | <header> </header> |
1. HTML ๋ฌธ์์ ํค๋ ์์ญ์ ์๋ฏธํ๋ ํ๊ทธ๋ก, ์ ๋ชฉ์ด๋ ๋ด๋น๊ฒ์ด์ , ๊ฒ์ ๋ฑ์ ๋ด์ฉ๋ค์ ํฌํจํ ์ ์์ต๋๋ค. |
2. ํ ์คํธ, ์ธ๋ผ์ธ ์์, ๋ธ๋ก ๋ ๋ฒจ ์์๋ฅผ ํฌํจํ ์ ์์ง๋ง <header>, <footer> ํ๊ทธ๋ ํฌํจํ ์ ์์ต๋๋ค. | ||
<section> </section> |
1. HTML ๋ฌธ์์์ ๋งฅ๋ฝ์ด ๊ฐ์ ์์๋ค์ ์ฃผ์ ๋ณ๋ก ๊ทธ๋ฃนํํด์ฃผ๋ ํ๊ทธ์ด๋ฉฐ, ์น์ ์ฃผ์ ์ ๋ํ ์ ๋ชฉ ์์๋ฅผ ํฌํจํ๋ ๊ฒ์ด ์ข์ต๋๋ค. | |
2. ํ ์คํธ, ์ธ๋ผ์ธ ์์, ๋ธ๋ก ๋ ๋ฒจ ์์๋ฅผ ํฌํจํ ์ ์์ต๋๋ค. | ||
<footer> </footer> |
1. HTML ๋ฌธ์์ ํธํฐ ์์ญ์ ์๋ฏธํ๋ ํ๊ทธ๋ก, ์น์ ์์ฑ์๋ ์ ์๊ถ์ ๋ํ ์ ๋ณด, ๊ด๋ จ๋ ๋ฌธ์์๋งํฌ๋ฅผ ํฌํจํ ์ ์์ต๋๋ค. | |
2. ํ ์คํธ, ์ธ๋ผ์ธ ์์, ๋ธ๋ก ๋ ๋ฒจ ์์๋ฅผ ํฌํจํ ์ ์์ง๋ง <header>, <footer> ํ๊ทธ๋ ํฌํจํ ์ ์์ต๋๋ค. | ||
<nav> </nav> |
1. HTML ๋ฌธ์์ ๋ฉ์ธ ๋ฉ๋ด๋ ๋ชฉ์ฐจ ๋ฑ์ ์ ์ํด์ฃผ๋ ํ๊ทธ์ ๋๋ค. | |
2. ํ ์คํธ, ์ธ๋ผ์ธ ์์, ๋ธ๋ก ๋ ๋ฒจ ์์๋ฅผ ํฌํจํ ์ ์์ต๋๋ค. | ||
<article> </article> |
1. HTML ๋ฌธ์ ๋ด์์ ๋ ๋ฆฝ์ ์ผ๋ก ๋ฐฐํฌ ๋๋ ์ฌ์ฌ์ฉ์ด ๊ฐ๋ฅํ ๊ฒ์๋ฌผ, ๋ด์ค ๊ธฐ์ฌ, ๋ธ๋ก๊ทธ ํฌ์คํ ๋ฑ์ ์๋ฏธํ๋ ํ๊ทธ์ด๋ฉฐ, ์ ๋ชฉ ์์๋ฅผ ํฌํจํ๋ ๊ฒ์ด ์ข์ต๋๋ค. | |
2. ํ ์คํธ, ์ธ๋ผ์ธ ์์, ๋ธ๋ก ๋ ๋ฒจ ์์๋ฅผ ํฌํจํ ์ ์์ต๋๋ค. | ||
<aside> </aside> |
1. ๋ฉ์ธ ์ฝํ ์ธ ์ ์ง์ ์ ์ผ๋ก ๊ด๋ จ์ด ์๋ ์์ญ์ ์๋ฏธํ๋ ํ๊ทธ์ด๋ฉฐ, HTML ๋ฌธ์์ ์ค๋ฅธ์ชฝ์ด๋ ์ผ์ชฝ์ ์ฌ์ด๋ ๋ฉ๋ด๋ ๊ด๊ณ ๋ฑ์ ์์ญ์ผ๋ก ์ฌ์ฉ๋ฉ๋๋ค. | |
2. ํ ์คํธ, ์ธ๋ผ์ธ ์์, ๋ธ๋ก ๋ ๋ฒจ ์์๋ฅผ ํฌํจํ ์ ์์ต๋๋ค. |
๊ตฌ์กฐ ๊ด๋ จ ์์ ํ์ฉํ๊ธฐ : HTML
Figma๋ฅผ ํตํด ๋ค์๊ณผ ๊ฐ์ ๋ ์ด์์์ ์ ์ํ์ต๋๋ค. ๊ตฌ์กฐ ๊ด๋ จ ์์๋ฅผ ์ฌ์ฉํ์ฌ ํด๋น ๋ ์ด์์์ ์ฝ๋ฉํด ๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค.
HTML ์์ค ๋ณด๊ธฐ
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>๊ตฌ์กฐ ๊ด๋ จ ์์</title>
</head>
<body>
<div class="container">
<header>
<h1><a href="#">๋ฐ์ํ์น</a></h1>
<nav>
<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>
</header>
<div class="section">
<section>
<h2>์ฝํ
์ธ ๊ทธ๋ฃน01</h2>
</section>
<section>
<h2>์ฝํ
์ธ ๊ทธ๋ฃน02</h2>
</section>
<article>
<h2>์ฃผ์ ๊ธฐ์ฌ</h2>
</article>
<aside>๊ด๊ณ </aside>
</div>
<footer>
<address>๊ฒฝ๊ธฐ๋ ์์ฐ์ ๋จ์๊ตฌ ๊ณ ์๋ ์ด๋๊ฐ 031)234-5678 mo0647@naver.com</address>
<p>์ ์๊ถ์ด ๋ญ์ง?</p>
</footer>
</div>
</body>
</html>
๊ฒฐ๊ณผ๋ณด๊ธฐ

๊ตฌ์กฐ ๊ด๋ จ ์์๋ฅผ ์ฌ์ฉํ์ฌ๋ HTML๋ง์ ์ด์ฉํด ์์ ํ๋ฉด, ๋ ์ด์์์ด ๋ํ๋์ง ์์ต๋๋ค. CSS๋ก ์คํ์ผ ์์ฑ์ ์ถ๊ฐํด ์ฃผ๋๋ก ํ๊ฒ ์ต๋๋ค.
๊ตฌ์กฐ ๊ด๋ จ ์์ ํ์ฉํ๊ธฐ : CSS
flex ์์ฑ์ ์ฌ์ฉํ๊ธฐ ์ํด article๊ณผ aside์ ๋ถ๋ชจ div ๋ฐ์ค๋ฅผ ๋ง๋ค์ด ์์ ํ์ต๋๋ค. ๊ฒฐ๊ณผ๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
CSS ์์ค ๋ณด๊ธฐ
/* reset */
* {
margin: 0;
padding: 0;
font-weight: normal;
list-style-type: none;
font-size: 20px;
}
h1, h2, h3, h4, h5, h6 {
font-size: 20px;
}
a {
text-decoration: none;
color: black;
}
/* container */
body {
background-color: #FFEBEB;
}
.container {
width: 1160px;
background-color: #FFEBEB;
margin: 120px auto;
height: 905px;
}
/* header */
header {
width: 1160px;
height: 200px;
background-color: #FF8686;
margin-bottom: 30px;
display: flex;
position: relative
}
header > h1 {
width: 150px;
height: 150px;
background-color: #FFB7B7;
line-height: 150px;
text-align: center;
margin: 25px;
}
header > span {
width: 120px;
height: 25px;
background-color: #000;
color: white;
text-align: center;
line-height: 25px;
position: absolute;
top: 40px;
left: 520px;
}
header > nav {
width: 930px;
height: 75px;
background-color: #FFB7B7;
margin-top: 100px;
}
header > nav > ul {
display: flex;
justify-content: space-around;
line-height: 75px;
}
/* section */
.section {
width: 1160px;
height: 475px;
background-color: #FF8686;
margin-bottom: 30px;
display: flex;
position: relative;
}
.section > span {
width: 120px;
height: 25px;
background-color: #000;
color: white;
text-align: center;
line-height: 25px;
position: absolute;
}
.section > section {
width: 355px;
height: 425px;
background-color: #FFB7B7;
margin: 25px 0 0 25px;
line-height: 425px;
text-align: center;
}
.section article {
width: 350px;
height: 200px;
background-color: #ffb7b7;
margin: 25px;
text-align: center;
line-height: 200px;
}
.section aside {
width: 350px;
height: 200px;
background-color: #ffb7b7;
margin: 25px;
text-align: center;
line-height: 200px;
}
/* footer */
footer {
width: 1160px;
height: 170px;
background-color: #FF8686;
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
align-items: center;
position: relative;
}
footer span {
width: 120px;
height: 25px;
background-color: #000;
color: white;
text-align: center;
line-height: 25px;
position: absolute;
top: 0;
left: 0;
}
footer address {
width: 930px;
height: 55px;
background-color: #ffb7b7;
line-height: 55px;
font-style: normal;
margin-top: 25px;
margin-right: 30px;
padding-left: 5px;
}
footer p {
width: 930px;
height: 55px;
background-color: #ffb7b7;
line-height: 55px;
margin-right: 30px;
margin-bottom: 25px;
padding-left: 5px;
}
'HTML' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
HTML : ๋ธ๋ก ๊ตฌ์กฐ์ ์ธ๋ผ์ธ ๊ตฌ์กฐ (4) | 2022.08.21 |
---|---|
HTML : ์น ํ์ค๊ณผ ์น ์ ๊ทผ์ฑ, ์น ํธํ์ฑ (12) | 2022.08.08 |
๋๊ธ