4 min read · Free · No login needed
A well-built page is divided into clear sections. HTML gives you semantic layout elements for that — tags whose names say what the section is. Using them makes your page easier to read, better for Google, and easier for screen readers to navigate.
<header> — the top of the page: logo, site name, and usually the navigation.<nav> — the navigation menu, with links to the main pages.<main> — the main content of the page. Only one per page.<section> — a themed group of content inside the main area.<article> — a self-contained piece of content, like a blog post or a news story.<aside> — side content: a sidebar, related links, an ad.<footer> — the bottom of the page: contact details, copyright, extra links.The order is almost always the same: header, nav, main (with sections and articles), aside, footer. This pattern is so common that visitors expect it — they look for the menu at the top and the contact details at the bottom without thinking.
A layout is how the parts of a page are arranged: a header at the top, a navigation menu, the main content in the middle, maybe a sidebar, and a footer at the bottom. In the early days of the web, people built layouts with tables. Today we use semantic tags for the parts and CSS — usually Flexbox or Grid — for the positioning.
Most websites use the same skeleton. Here it is with semantic tags:
<header>Logo and site title</header> <nav>Home | Courses | Blog | Contact</nav> <main> <section>Main content goes here</section> <aside>Sidebar: links and ads</aside> </main> <footer>Copyright and contact info</footer>
Each tag has a job: <header> is the top of the page, <nav> holds the menu, <main> holds the page's main content (only one per page), <aside> is the side content, and <footer> is the bottom.
<main> with a <section> and an <aside> will stack vertically until you add CSS like display: flex; to put them next to each other.<main> elements on one page — there must be only one.<nav> — screen readers then cannot find the menu.<header><h1>My Website</h1></header> — the top of the page: the site name.<nav> — the navigation menu. The two links inside are the main pages of the site.<main> — the main content of the page. There is only one per page, and everything important sits inside it.<section> and <aside> — the section holds the main content, the aside holds the side content (related links) that sits beside it.<footer> — the bottom of the page: copyright and contact information.<!DOCTYPE html>
<html>
<head>
<title>Layout</title>
</head>
<body>
<header><h1>My Website</h1></header>
<nav><a href="#">Home</a> | <a href="#">About</a></nav>
<main>
<section><h2>Welcome</h2><p>Main content here.</p></section>
<aside><p>Sidebar: related links.</p></aside>
</main>
<footer><p>© 2026 My Website</p></footer>
</body>
</html>
Change the code below and press Run to see the result instantly. No file to save, no login needed.
The questions learners ask most about this lesson — read the question, then open it to see the answer.
Header, nav, main with sections and articles, aside, then footer, a pattern visitors expect.
Only one, and everything important on the page sits inside it.
No, HTML only names the parts; CSS such as Flexbox or Grid positions them, otherwise they stack vertically.
AI can write code for you, but it cannot think for you. When you learn HTML yourself, your brain builds the real skill: you understand why a page looks the way it does, you can fix it when it breaks, and you can answer it in an exam or an interview without help. That is the skill that gets you a job — not a copied answer.
Finish all 35 lessons, pass the test (80%), pay ₹10 and get your certificate.
Take the testPrefer watching? Video courses teach the same topics step by step.
Free tutorials teach you the basics. Our paid courses add live projects, mentorship and a certificate.
Browse all coursesAsk about courses, website & more
Request human callback:
Please log in to download. You will stay on this page after logging in!
New here? Register now →