HTML layout defines the structure of a webpage — the framework along which the content is arranged, including the header, navigation, main content, and footer.
A basic HTML layout often includes <header>, <nav>, <main>, <aside>, and <footer> sections. These semantic elements provide a clear structure to the page.
html
<body>
<header>Header content</header>
<nav>Navigation</nav>
<main>Main content area</main>
<aside>Sidebar</aside>
<footer>Footer content</footer>
</body>
Semantic elements help search engines and accessibility tools better understand the structure of your page. They are recommended on all modern websites.
We often use CSS Grid or Flexbox to implement layout structures. These allow precise positioning and responsive arrangements across different screen sizes.
css
body {
display: grid;
grid-template-areas:
"header header"
"nav main"
"footer footer";
}
The following HTML example shows a basic layout structure, where the content is placed inside a container and organized into logical sections.
html
<div class="container">
<header>Header</header>
<main>Main Content</main>
<aside>Sidebar</aside>
<footer>Footer</footer>
</div>
HTML layout is not limited to a specific structure. You can apply grid layouts, single or multi-row content, or responsive designs.
Always aim for a simple, well-structured layout. Use semantic tags and rely on CSS for layout adjustments—not on <table> or excessive <div> nesting.
Select Language
Set theme
© 2025 ReadyTools. All rights reserved.