Skip to content
Learn Netverks

Lesson

Step 28/58 48% through track

layout

Page layout with HTML

Last reviewed May 28, 2026 Content v20260528
Track mode
iframe_html
Means
HTML preview sandbox
Reading
~3 min
Level
advanced

This lesson

This lesson teaches Page layout with HTML—the ideas, syntax, and habits you need before moving on in HTML.

Without a solid grasp of Page layout with HTML, you will repeat mistakes in HTML exercises and on real pages or scripts.

You will apply Page layout with HTML in contexts like: Websites, hybrid apps, email templates, design systems, and CMS-driven content.

Read the lesson, edit HTML/CSS in the playground, press Run to preview, then answer the lesson MCQs. Also use the HTML reference desk when you need tag or attribute lookup.

When intermediate lessons feel comfortable and you are ready for production-style trade-offs.

Structural semantics describe regions so humans and assistive tech understand the page before CSS rearranges visuals.

<body>
  <header>Brand / utilities</header>
  <nav aria-label="Primary">Main menu</nav>
  <main>
    <article>
      <h1>Article headline</h1>
      <p>…</p>
    </article>
    <aside>Supporting widgets</aside>
  </main>
  <footer>Legal / contact</footer>
</body>

Landmarks

  • header/footer can repeat per sectioning roots.
  • main should appear once per document (exceptions exist but require care).
  • nav wraps major navigation—not every link list.

Articles vs sections

  • article: self-contained compositions (blog posts, cards).
  • section: thematic grouping inside broader docs—still wants headings.

Skip links

Provide “Skip to content” anchors at the top for keyboard users jumping past repetitive navigation.

Landmark discipline

  • Multiple main elements (even if spec edge cases permit) confuse assistive landmarks—prefer one coherent main.
  • Advertising iframes often inject extra focusable starters—coordinate skip links accordingly.

SPA vs SSR layout

Hydrating apps should preserve heading order shell-to-route; avoid rendering empty shells with heading promises that load later asynchronously without live regions announcing readiness.

Wireframe vs real landmarks

The grid below uses labelled divs for a quick layout sketch. Replace each region with real <header>, <nav>, <main>, <aside>, <footer> when you ship.

header — brand, util links
nav — primary menu
main — article / task flow
aside — related
footer — legal, contact

Example — minimal semantic shell (copy-paste starter)

<body>
  <header><p>Logo</p></header>
  <nav aria-label="Primary"><ul><li><a href="/">Home</a></li></ul></nav>
  <main id="content"><h1>Page title</h1></main>
  <footer><p>© Org</p></footer>
</body>

Important interview questions and answers

  1. Q: What is the practical difference between `id` and `class`?
    A: `id` must be unique and is used for fragments/labeling; `class` is reusable for styling and behavior grouping.
  2. Q: Why is `defer` commonly preferred for scripts?
    A: It preserves HTML parsing, executes after parse, and avoids blocking rendering unlike classic synchronous scripts.
  3. Q: How do `srcset` and `sizes` work together?
    A: `srcset` provides candidate files and `sizes` tells expected rendered width so the browser can pick an optimal resource.

Tip: Structure with HTML first; reach for CSS Grid/Flexbox for visual layout.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs in your browser in a sandboxed frame. Backend runners appear when this track’s profile allows them.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • What confused you about this lesson?
  • How would you explain this to a teammate in 30 seconds?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump