💡 퀵 접속: htm.kr/body
Body 태그는 HTML 문서의 본문을 포함하는 컨테이너로, 웹 페이지에 표시되는 모든 콘텐츠(텍스트, 이미지, 링크 등)를 담고 있습니다.
<body>
<header>
<h1>제목</h1>
<nav>네비게이션</nav>
</header>
<main>
<article>
<h2>본문 제목</h2>
<p>본문 내용</p>
</article>
</main>
<footer>
<p>푸터 내용</p>
</footer>
</body>
| 태그 | 설명 | 사용 예시 |
|---|---|---|
| header | 페이지 상단 영역 | <header>로고, 네비게이션</header> |
| main | 주요 콘텐츠 영역 | <main>본문 내용</main> |
| footer | 페이지 하단 영역 | <footer>저작권 정보</footer> |
| section | 콘텐츠 섹션 | <section>관련 콘텐츠 그룹</section> |
| article | 독립적인 콘텐츠 | <article>블로그 포스트</article> |
<body onload="init()">
<body class="dark-theme">
<body id="main-content">
<body style="background-color: #f0f0f0;">
<body>
<header>
<nav>
<ul>
<li><a href="#home">홈</a></li>
<li><a href="#about">소개</a></li>
</ul>
</nav>
</header>
<main>
<article>
<h1>메인 제목</h1>
<section>
<h2>섹션 제목</h2>
<p>섹션 내용</p>
</section>
</article>
</main>
<aside>
<h3>사이드바</h3>
<ul>
<li>관련 링크 1</li>
<li>관련 링크 2</li>
</ul>
</aside>
<footer>
<p>© 2024 웹사이트. All rights reserved.</p>
</footer>
</body>
Body 태그가 올바르게 구성되었는지 확인하는 방법: