Anatomy of a Webpage
Every great website follows the same fundamental structure. Poke at it, hover it, tab through it. This page teaches by letting you take it apart.
Visual blueprint
The Anatomy Revealed
Five markers, five roles. Hover or tab to each one. Every marker here is a real, focusable button, not just a mouse-only hover trick.
- Navigation
- Hero
- The Fold
- Content
- Footer
Five pieces, seen in isolation. Want to see them assembled into a real homepage, start to finish?
Reading patterns
How Eyes Move
F-Pattern Reading
Users scan text-heavy pages in an F-shape: top-left to right, then down the left side. One of the more rigorously studied patterns in web UX, from Nielsen Norman Group's eye-tracking research.
Z-Pattern for Landing
On image-heavy, low-text pages, eyes tend to move in a Z: top-left, top-right, diagonal down, bottom-left to right. It's a looser heuristic than the F-pattern, more of a starting hypothesis than a law.
The 8pt Grid System
All spacing uses multiples of 8px. It creates visual rhythm and makes responsive design predictable. It's the same convention behind Google's Material Design spacing scale.
Building blocks
The Essential Sections
Master these six elements and you'll understand most of web design.
The Hero
The first thing visitors see. Makes or breaks the first impression.
- Keep copy concise: aim for 6–8 words in the headline
- Use one clear call-to-action, not five
- Hero images should support, not distract from, the message
Navigation
The roadmap to your content. Should be invisible until needed.
- Maximum 7 items in primary navigation
- Logo always links home
- Current page should be visually distinct
The Fold
The visible area before scrolling. People do scroll, but this space still gets disproportionately more attention.
- Core value proposition must be above the fold
- Include a scroll indicator if content continues
- Don't cram everything in. Tease what's below
Typography Hierarchy
Visual hierarchy through type creates scannable content.
- Limit to 2–3 font families maximum
- Use consistent heading sizes (H1 > H2 > H3)
- Body text: 16–18px for screens
Whitespace
The breathing room that makes content digestible.
- More whitespace often reads as more premium
- Use consistent spacing units (8px base)
- Let important elements breathe
Footer
The last impression. Where skeptical visitors look for legitimacy.
- Include contact info and social links
- Secondary navigation for SEO
- Copyright and legal links belong here
Type system
Typography Scale
Consistent type sizes create hierarchy and make content scannable. This scale is live. It's the same Fredoka/Nunito pairing driving every heading on this page.
8pt grid
Spacing System
Consistent spacing creates visual rhythm. Every value below is a real multiple of 8, rendered at true size.
Tight
Default
Relaxed
Loose
Section
Major
Boxes are one thing. Here's the same 8pt system applied to an actual card, next to a card that ignores it.
✗ Ignores the grid
Weekly Digest
Your top stories, curated every Monday morning.
Subscribe✓ Follows the 8pt grid
Weekly Digest
Your top stories, curated every Monday morning.
SubscribePro tip: use 8px for inline elements, 16px for related items, 24–32px between groups, and 48–96px between major sections.
Interaction design
Button States
Every button has at least four states, plus two more people tend to forget: focus, and whatever happens while it's working. These aren't illustrations. Hover, click, and tab to the buttons below to trigger each state for real.
Stacking context
Z-Index: The Layer Cake
Z-index controls stacking order. It's not random. It's an org chart: modal at 1000, sticky nav at 100, dropdowns at 10, content at 1.
Structure
Semantic HTML: The Layer Underneath
These two mockups render identically. Same boxes, same text, same position on screen. One of them is invisible to a screen reader. Toggle the outline to see which.
div › div › div › div › div
"div. div. div. div. div." No landmarks to jump between. No way to skip straight to the content.
header › nav › main › article + aside › footer
"Banner landmark. Navigation landmark. Main landmark. Complementary landmark. Content info landmark." Five jump points, for free.
Sighted users never notice the difference. Both mockups look pixel-identical. The gap is entirely in the layer underneath what you can see.
Screen readers build a navigable outline from real landmark elements. A wall of divs gives them nothing to build it from.
Search engines and browser reader-modes lean on <main> and <article> to figure out what the actual content is, separate from nav and chrome.
Inclusive design
Accessibility: Design for Humans
Build for everyone. Not everyone uses a mouse. Not everyone can see your colors.
Describe images for screen readers by their function, not just their contents. "Team celebrating a product launch" beats "IMG_4829.jpg."
WCAG AA needs 4.5:1 contrast for normal text, but only 3:1 for large text (18px+, or 14px+ bold) and UI component borders.
Tab through your site. If you can't reach something without a mouse, it's broken. Every marker and demo on this page is a real, focusable element.
Use ARIA to help screen readers understand interactive elements that native HTML can't describe alone, but reach for semantic HTML first and ARIA second.
Every focusable element needs a visible focus indicator. It's easy to forget because a mouse never triggers it. See the Button States demo above.
<button aria-label="Close modal">✕</button>
<img src="hero.jpg" alt="Team celebrating a product launch"> Behind the scenes
What the Eye Can't See
Every page quietly collects more than what's on screen. Here's what that is, why it needs disclosing, and where the paperwork actually comes from.
Cookies & tracking. Small files or scripts that remember who a visitor is between visits: login sessions, shopping carts, analytics like Google Analytics, ad pixels like Meta's. First-party cookies come from the site itself; third-party ones come from someone else's script running on it, usually for advertising.
Privacy Policy. A page disclosing what data gets collected, why, and what a visitor can do about it. Legally required in most places (GDPR in the EU, CCPA in California) for almost any site running analytics or a contact form, not just stores.
Terms of Service. The rules for using the site: acceptable use, liability limits, who owns what. Not always legally required, but it's what protects the business if something goes wrong.
Where to actually get one: free generators like Termly, GetTerms, and PrivacyPolicies.com produce a reasonable starting template for a small site. If the site handles payments, health data, or anything sensitive, a template stops being enough, and it's worth paying an actual lawyer. This is general orientation, not legal advice.
Under the hood
Performance (And How to Prove It)
A beautiful page that takes eight seconds to load loses people before they see it. Here's what actually gets measured, in three numbers.
LCP
Largest Contentful Paint: how fast the main content appears. Good is under 2.5 seconds.
INP
Interaction to Next Paint: how fast the page responds to a click or tap. Good is under 200 milliseconds.
CLS
Cumulative Layout Shift: how much content jumps around while loading. Good is under 0.1.
These are Google's Core Web Vitals, and every tool below checks them for free.
Google PageSpeed Insights and WebPageTest. Paste in a URL, get real Core Web Vitals scores and a specific list of what's slow.
WAVE (by WebAIM) and axe DevTools. Browser extensions that scan a live page for contrast failures, missing alt text, and other accessibility issues.
Google Search Console. Free, and it's how Google itself tells a site owner what it can and can't find or index.
Lighthouse, built into Chrome DevTools (open DevTools, click the Lighthouse tab). One free report covering performance, accessibility, best practices, and SEO at once. Start here before reaching for anything else.
Scroll effects
The depth illusion
Parallax
Notice how this text sits still while the field behind it holds its position as you scroll? Disabled automatically if you've asked your system to reduce motion.
The Hot Sauce Rule: a little parallax goes a long way. Use it for one hero-scale moment, not every scroll.
Reference
Dev Dictionary
Essential terminology for speaking the language of web design.
- Above the fold
- Content visible without scrolling.
- CTA
- Call to Action: the button you want people to click.
- Hero
- The large banner section at the top of a page.
- Viewport
- The visible area of a web page in the browser.
- Responsive
- Design that adapts to different screen sizes.
- Breakpoint
- Screen width where a layout changes (e.g., 768px).
- Grid system
- 12-column layout framework for alignment.
- Z-index
- Stacking order of overlapping elements.
- Semantic HTML
- Using meaningful tags like nav, main, article, instead of generic divs for everything.
- Accessibility
- Making content usable for people with disabilities.
- Mobile-first
- Designing for small screens first, then scaling up.
- White space
- Empty space that gives content room to breathe.
- Landmark
- A region of a page, like nav, main, or footer, that a screen reader can jump straight to.
- Cookie
- A small piece of data a site stores in your browser to remember you between visits.
- Third-party cookie
- A cookie set by a domain other than the one you're visiting, usually for ad tracking.
- GDPR
- The EU's data privacy law. Requires sites to disclose what personal data they collect and get consent.
- Core Web Vitals
- Google's three real-world performance metrics: LCP, INP, and CLS.
- Lighthouse
- A free tool built into Chrome DevTools that audits performance, accessibility, best practices, and SEO at once.
- Container query
- A CSS rule that responds to the size of its own container, not the size of the browser window.
- Neo-brutalism
- A design trend using thick borders, hard offset shadows, and bold color instead of subtlety.
- Modal
- A dialog window that sits on top of the page and blocks interaction with everything behind it until closed.
Keep going
Where to Actually Learn This
This page is a tour, not a course. The full list of free courses, paid courses, professional support, and sources this page draws on lives on its own page, since it's the kind of thing worth adding to over time.
Interactive lab
Learn by Exploring
Click to open interactive demos and a couple of downloadable resources.
One more thing
What's With the Grid?
Every section on this page secretly lines up to an invisible 12-column grid, the same system behind frameworks like Bootstrap and Tailwind. Press G, or use the button below, to see it.