Skip to article content
FrontendXLearning path

HTML and CSS Foundations

Build semantic, accessible and responsive interfaces from a blank page, and explain why each layout and styling decision works.

beginner · 30 lessons · 54 exercises · about 900 minutes

  • Predict
  • Explain
  • Implement
  • Debug
  • Interview

What you will be able to do

#
  • Write semantic HTML that exposes an accurate accessibility tree.
  • Build accessible forms with labels, native validation and clear error messaging.
  • Lay out components with normal flow, Flexbox and CSS Grid from first principles.
  • Make layouts responsive with mobile-first media queries, container queries and fluid sizing.
  • Apply modern CSS: cascade layers, custom properties, :has() and reduced-motion support.

Prerequisites

#

No prior course is required. This course starts from first principles.

Lessons

#
  1. Document structure and the element tree

    beginner · 25 minutes · 2 exercises

    Explain how the browser turns HTML source into a DOM tree.

  2. Semantic landmarks and sectioning content

    beginner · 30 minutes · 1 exercises

    Choose between header, nav, main, section, article and aside based on meaning.

  3. Text-level semantics and inline elements

    beginner · 25 minutes · 1 exercises

    Pick the inline element that carries the correct meaning.

  4. Links, images and media with accessible alternatives

    beginner · 30 minutes · 1 exercises

    Write link text that makes sense out of context.

  5. Lists, tables and data semantics

    beginner · 30 minutes · 1 exercises

    Use list elements for navigation and grouped content.

  6. Form element anatomy and native controls

    beginner · 30 minutes · 2 exercises

    Choose the correct native control for a given input.

  7. Labels, fieldsets and accessible names

    beginner · 30 minutes · 2 exercises

    Associate labels with controls using for and id or wrapping.

  8. Input types, validation and constraint attributes

    intermediate · 35 minutes · 2 exercises

    Apply native constraint validation attributes correctly.

  9. Form submission, methods and encoding

    intermediate · 30 minutes · 2 exercises

    Choose between GET and POST for a given form.

  10. Error messaging and inline validation UX

    intermediate · 35 minutes · 2 exercises

    Associate an error message with the field it describes.

  11. The accessibility tree and assistive technology model

    intermediate · 30 minutes · 2 exercises

    Describe how the DOM maps to the accessibility tree.

  12. Keyboard navigation and focus management

    intermediate · 35 minutes · 2 exercises

    Explain the difference between focus order and DOM order.

  13. Color contrast, target size and visual accessibility

    intermediate · 30 minutes · 2 exercises

    Check text and UI contrast against WCAG 2.2 AA thresholds.

  14. ARIA roles, states and properties: when to use them

    advanced · 40 minutes · 2 exercises

    Decide when a native element is available and when ARIA is required.

  15. Landmarks, skip links and page structure for screen readers

    intermediate · 30 minutes · 1 exercises

    Provide a skip link that becomes visible on focus.

  16. Normal flow, the box model and box-sizing

    beginner · 35 minutes · 2 exercises

    Compute the rendered size of a box from its content, padding, border and margin.

  17. Display types and formatting contexts

    intermediate · 35 minutes · 2 exercises

    Distinguish block, inline and inline-block behavior.

  18. Flexbox: axes, alignment and distribution

    intermediate · 40 minutes · 2 exercises

    Align and distribute items along the main and cross axes.

  19. CSS Grid: tracks, areas and implicit grids

    intermediate · 40 minutes · 2 exercises

    Define a grid with columns, rows and gaps.

  20. Positioning and stacking contexts

    advanced · 40 minutes · 2 exercises

    Choose between static, relative, absolute, fixed and sticky positioning.

  21. Logical properties and writing modes

    advanced · 35 minutes · 1 exercises

    Replace physical properties with logical equivalents.

  22. Viewport meta and mobile-first thinking

    beginner · 30 minutes · 2 exercises

    Explain what the viewport meta tag does on mobile.

  23. Media queries and container queries

    intermediate · 40 minutes · 2 exercises

    Write media queries for viewport conditions.

  24. Fluid typography and spacing with clamp

    intermediate · 35 minutes · 2 exercises

    Use clamp to scale type and space between a minimum and a maximum.

  25. Responsive images: srcset, sizes and picture

    advanced · 40 minutes · 2 exercises

    Serve an appropriately sized image for the viewport and pixel density.

  26. Intrinsic and responsive layout patterns

    advanced · 40 minutes · 2 exercises

    Build layouts that adapt without explicit breakpoints.

  27. Cascade layers, specificity and the @layer at-rule

    advanced · 45 minutes · 2 exercises

    Order the cascade by layer rather than by specificity wars.

  28. Custom properties and design tokens

    advanced · 40 minutes · 2 exercises

    Define and consume custom properties for a token system.

  29. Transitions, animations and reduced motion

    advanced · 40 minutes · 2 exercises

    Animate properties that are cheap to animate and avoid layout thrash.

  30. Modern CSS: :has(), nesting, subgrid and container units

    advanced · 45 minutes · 2 exercises

    Use :has() to style a parent based on its children.

Study journeys

#

Skip-ahead journeys never remove a requirement. The prerequisite graph always reports the full chain; a skip-ahead course only marks where an assessment may substitute for study.

© 2026 FrontendX. All rights reserved.