SA-21/06, C-11, Asapur, Varanasi, UP support@kamaldnp.com +91 8318013442
Lesson 27 of 30

HTML Layout

2 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.

The classic layout

  • <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.

How it looks in code

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.

Tip: Before writing any code for a new page, sketch the layout on paper — a rectangle for the header, one for the menu, a big one for the content, a small one for the sidebar, one for the footer. Then write one tag per rectangle. The code almost writes itself.

Example

Example
<!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>

Output

Output — how it looks in the browser
Output of HTML Layout
Try it yourself: copy the code above into a file named test.html, open it in your browser, and change the text to see what happens. That is how you learn — by changing things and watching the result.
Get certified — just ₹10

Finish all 30 lessons, pass the test (80%), pay ₹10 and get your certificate.

Take the test
Go further with a full course

Free tutorials teach you the basics. Our paid courses add live projects, mentorship and a certificate.

Summer Industrial Training in MERN Stack 2026
₹3,000
View
Full Stack PHP Development Course 2026
₹3,000
View
AI Power Skills in 2 Days | Learn AI Text, Image, Video and Voice Tools
View
Browse all courses
HTML — Lessons
1. HTML Introduction 2. HTML Editors 3. HTML Basic 4. HTML Elements 5. HTML Attributes 6. HTML Headings 7. HTML Paragraphs 8. HTML Styles 9. HTML Formatting 10. HTML Comments 11. HTML Colors 12. HTML CSS 13. HTML Links 14. HTML Images 15. HTML Favicon 16. HTML Page Title 17. HTML Tables 18. HTML Lists 19. HTML Block and Inline Elements 20. HTML Div 21. HTML Classes 22. HTML Id 23. HTML Iframes 24. HTML JavaScript 25. HTML File Paths 26. HTML Head 27. HTML Layout 28. HTML Responsive 29. HTML Semantics 30. HTML Forms
Final Test — Certificate ₹10

🤖 KAMALDNP AI Assistant

Ask about courses, website & more

Hi! I'm KAMALDNP AI Assistant. Ask me about our courses, website features, or anything else! 😊
Please wait 5s...
🛡️ 7-Day Money-Back Guarantee
🤖 KAMALDNP Assistant ✕

Request human callback:

🔐 Login Required
✕

Download karne ke liye login karo. Login ke baad yahi page pe rahoge!

Naya ho? Register karo →