Skip to content
Learn Netverks

Lesson

Step 2/31 6% through track

two-layers

Structure vs presentation

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

This lesson

This lesson teaches Structure vs presentation—the ideas, syntax, and habits you need before moving on in HTML & CSS.

Without a solid grasp of Structure vs presentation, you will repeat mistakes in HTML & CSS exercises and on real pages or scripts.

You will apply Structure vs presentation in contexts like: Landing pages, dashboards, marketing sites, and portfolio pieces built without a framework.

Read the lesson, edit HTML/CSS in the playground, press Run to preview, then answer the lesson MCQs.

Early in the track—complete this before layout, scripting, or architecture lessons that assume these basics.

Professional front-end work splits what something is (HTML) from how it looks (CSS). Mixing them carelessly creates pages that break in assistive tech, search, and maintenance.

HTML answers “what is this?”

  • A primary heading is <h1>, not a <div> with huge font-size.
  • A form submit action is <button type="submit">, not a styled <div>.
  • Site regions use landmarks: <header>, <nav>, <main>, <footer>.

CSS answers “how should it look?”

  • Typography, spacing (box model), layout (flex/grid), color, borders, motion.

Anti-patterns to drop early

SmellBetter habit
Empty <div> soupPick the element that matches meaning
Inline style="" everywhereClasses in a stylesheet
Skipping alt on imagesDescribe the image purpose
Fake buttons as links<button> for actions

Important interview questions and answers

  1. Q: Should heading level be chosen for font size?
    A: No—choose level for document structure; size is CSS.
  2. Q: Why are landmarks useful?
    A: They help users jump regions quickly with assistive tech.
  3. Q: When is inline CSS acceptable?
    A: Rarely—email templates or quick prototypes; prefer classes for app UI.

Self-check

  1. Change <article> to <div>—what accessibility hint did you lose?
  2. Name two CSS properties for a “primary” button without changing element type.

Challenge

Name the layers

  1. In the playground, add an inline style on the paragraph.
  2. Move that style into the <style> block as a class.

Done when: the paragraph is styled only via CSS class, not inline style.

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 part of this lesson needs a second read?
  • What would you try differently in a real project?

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