Skip to content

Lesson 52 of 52Project

Wrap-Up: HTML & CSS

Tie the whole HTML and CSS course together: one realistic page built from a ticket to a live, accessible, fast release, a mixed review, and where to go next.

14 min read0/6 questions

You started this course with How Web Pages Work and a single <h1> on your own computer. Since then you have learned to structure content with semantic HTML, style and lay it out with CSS, make it accessible to keyboard and screen reader users, write the same ideas in Tailwind, and measure how fast it loads. You finished with three projects that each put a page online. On the job these skills never arrive one lesson at a time, so this lesson lines them up once more and then uses them together on one piece of work.

The path you took

The HTML & CSS course, unit by unit
  1. Unit 1

    HTML

    Elements, text, images, forms, tables, the head and SVG gave you meaningful structure, which every style and script depends on.

  2. Unit 2

    CSS foundations

    Selectors, specificity, the box model, colour, units and type showed you how the browser decides what each box looks like.

  3. Unit 3

    Layout

    Flexbox, Grid, positioning and responsive design let you place those boxes on any screen size.

  4. Unit 4

    Modern CSS

    Variables, theming, motion, dialogs, view transitions and CSS architecture turned single rules into a system that stays tidy as it grows.

  5. Unit 5

    Accessibility in depth

    WCAG, ARIA patterns, focus management and screen reader testing made sure the system works for everyone, not just mouse users.

  6. Unit 6

    Tailwind CSS

    Utility classes for spacing, colour, type and layout let you write the same CSS faster, straight in the markup.

  7. Unit 7

    Tailwind in practice

    Variants, motion, design tokens, React and team conventions showed how Tailwind holds up in real codebases.

  8. Unit 8

    Performance and tooling

    Core Web Vitals, font and image loading, DevTools and cross-browser fixes taught you to measure a page before you trust it.

  9. Unit 9

    Beyond the screen

    Print stylesheets and HTML email took your markup to paper and inboxes, where the rules are different.

  10. Unit 10

    Project

    A landing page, a portfolio and a dashboard put every unit to work on a complete page, from plan to deploy.

How it fits together

The ticket: "We are running a one-day design conference. Build the event page: a hero, the schedule, the speakers, and a registration form. It must work on phones, pass our accessibility audit, load fast on mobile data, and the confirmation email and printable ticket should match the brand." Here is how the course shows up, in the order you would really work.

Planning the content. Before any CSS, you write the page as plain HTML. The outline comes from headings, as in Text and Links: one h1 for the event, h2s for Schedule, Speakers and Register. The regions become header, nav, main and footer from Semantic HTML, so screen reader users can jump between them. The schedule is real tabular data, so it is a <table> with a <caption> and scope on its headers, following Tables. The head gets a title, description, viewport tag and Open Graph image from The Head and SEO, so the link looks right when people share it.

The form. Registration is where most pages fail an audit. Every field has a visible <label>, the email field uses type="email" with autocomplete="email", and the ticket choice sits in a fieldset with a legend, all from Forms. Errors are linked to their fields with aria-describedby and show only after the user has touched the field, using :user-invalid rather than :invalid.

Images and icons. Speaker photos get real alt text, explicit width and height, and loading="lazy" below the fold, from Images and Media. The hero image is the opposite: it is probably your largest paint, so it is not lazy and gets fetchpriority="high", as Loading Fonts and Images Fast explained. Social icons are inline SVG that use currentColor, with an accessible name on the link, from SVG for the Web.

Tokens and theme. The brand colours, spacing and type sizes become custom properties, as in CSS Variables and Theming, with a dark theme that follows prefers-color-scheme. If the team uses Tailwind, the same values go in @theme, from Tailwind Design Systems, so utilities and plain CSS read from one source.

Layout. The speaker cards use the auto-fit grid from Common Layouts, so they reflow from one column to four without a single media query. The header is a Flexbox row from Flexbox and is position: sticky from Positioning. Because the header is sticky, you add scroll-padding-top so in-page links and focused fields are not hidden under it, a fix from Keyboard Support and Focus Management. Sizes use rem and clamp() from Colors and Units, so the display heading scales with the screen and with the user's font setting.

Interaction. "Add to calendar" opens a menu, and the speaker bios open in a modal. You build the modal with <dialog> from Dialogs, Popovers and Anchored UI Without a Library, which gives you Escape, focus return and the top layer for free. The schedule tabs follow the pattern in ARIA Widget Patterns: Tabs, Menus, Comboboxes and Live Regions, and a short fade on open respects prefers-reduced-motion from Transitions and Animations.

Checking it. You run axe and then a 15-minute screen reader pass, as Testing with Screen Readers and Automated Tools described, and you tab through the whole page with the mouse unplugged. Contrast is checked against the levels in WCAG 2.2: What the Standard Actually Asks, and the focus ring is visible on every theme.

Making it fast. Lighthouse and field data from Core Web Vitals and Page Speed tell you the hero image is the LCP element and a web font causes layout shift. You preload the one font file with crossorigin and match the fallback metrics, both from Loading Fonts and Images Fast. When the schedule table sits in the wrong place on Safari, you trace the winning rule in the Elements panel (Browser DevTools for HTML, CSS and Performance) and add a fallback from Cross-Browser CSS and Progressive Enhancement.

Paper and inbox. The ticket page gets a print stylesheet that hides the navigation, shows link URLs and sets an @page margin (Print Stylesheets and Paged Output). The confirmation email is a separate, table-based layout with inline styles and a bulletproof button, because email clients do not run modern CSS (HTML Email: Building Emails That Render Everywhere).

Shipping. Finally you deploy the site the way you did in Project: A Landing Page, and check the live URL on a real phone.

Notice that no lesson worked alone. The semantic structure made the screen reader test short, the tokens made dark mode a few lines, and the width and height on images fixed a performance metric and a visual bug at once. That is front-end work in practice.

Check yourself

Predict the outputHTML & CSS

No other CSS applies to .card, so box-sizing is the default. How wide is the card on screen, in pixels?

.card {
width: 300px;
padding: 20px;
border: 5px solid;
}
Need a nudge? Hints walk you through it.
Quick check
Three rules set the colour of the same register button. Which colour wins? #register .btn { color: blue }, then .form .btn.primary { color: red }, then button { color: green }.
Need a nudge? A hint rules out a wrong answer.
Match the pairs0/6 matched

Match each job to the tool you would reach for first.

Choose an item, then its match on the other side.
Quick check
A teammate builds the register button as <div class='btn' onclick='register()'>Register</div>. What is the best review comment?
Need a nudge? A hint rules out a wrong answer.
Quick check
In a React component, a teammate builds the class as bg-${color}-500 so the badge colour comes from a prop. In production the badges have no colour. Why?
Need a nudge? A hint rules out a wrong answer.
Put it in order6 steps

Put the steps of building a new page in a sensible order.

  1. Tap the steps below in the right order.
Need a nudge? A hint shows where it starts.

What you can do now

  • Write semantic, valid HTML for real pages, including accessible forms, data tables, responsive images and a complete head.
  • Read any stylesheet and explain why a rule wins or loses, using specificity, the cascade and the box model.
  • Build responsive layouts with Flexbox and Grid that work from a phone to a wide monitor.
  • Set up a theme with custom properties or Tailwind tokens, including dark mode, and keep the CSS organised as it grows.
  • Build modals, menus and tabs that work with a keyboard and a screen reader, and test them.
  • Measure a page with Lighthouse and DevTools, and fix the common LCP and layout shift problems.
  • Style the same content for print and for email when a project needs it.

That is a solid foundation for a junior front-end role. What you do not have yet is JavaScript beyond small snippets, a framework, or experience inside a large existing codebase with its own conventions. The next courses and real projects give you those.

Mistakes that still catch people

  • Reaching for a div instead of the right element. Clickable divs, tables made of divs and headings chosen for their size all break assistive technology. Revisit Semantic HTML and Accessibility Basics.
  • Fighting specificity with more specificity. Adding ids and !important to win a rule makes the next change harder. Revisit Selectors and Specificity and CSS Architecture.
  • Images with no dimensions. Missing width and height cause layout shift and a worse CLS score. Revisit Images and Media and Core Web Vitals and Page Speed.
  • Removing the focus outline. outline: none without a replacement leaves keyboard users lost. Revisit Keyboard Support and Focus Management.
  • Building Tailwind class names from pieces. The CSS never gets generated. Revisit Tailwind with React and Next.js.
  • Testing only on your own laptop. A layout that works in Chrome on a wide screen can break on iOS Safari or at 200% zoom. Revisit Responsive Design and Cross-Browser CSS and Progressive Enhancement.

Where to go next

The natural next course is JavaScript & TypeScript: you have built the structure and the look, and JavaScript is what makes a page respond to people. After that, React turns your HTML and Tailwind into reusable components, and Next.js puts them in a full app with routing, server rendering and deploys, much like the dashboard project hinted at.

Real practice matters as much as the next course:

  • Rebuild a page you use every day. Pick a news article, a pricing page or a sign-in screen and rebuild it from scratch, then compare your HTML and CSS with the real one in DevTools.
  • Fix accessibility issues in open source. Many projects have open issues for missing labels, contrast and keyboard support. They are small, well defined and teach you to work in someone else's code.
  • Read the official references. MDN Web Docs for every element and property, the WCAG 2.2 quick reference, and the Tailwind docs will answer questions for years.
Key terms
semantic HTML
Markup that uses elements for their meaning, such as nav, button and table, so browsers, search engines and assistive technology understand the page.
cascade
The rules the browser uses to pick one value when several CSS declarations target the same property: origin, layers, specificity and source order.
design token
A named value such as a colour, size or spacing step, stored once and reused everywhere, often as a CSS custom property.
mobile-first
Writing the base styles for small screens and adding min-width media or container queries as space grows.
accessible name
The text a screen reader announces for a control, taken from its content, a label or ARIA attributes.
Core Web Vitals
Google's three user-experience metrics: LCP for loading, INP for responsiveness and CLS for visual stability.
progressive enhancement
Building a working baseline first, then adding newer features for browsers that support them.