HTML & CSS for Beginners
Build and style your own responsive, accessible web pages from scratch
A free, complete HTML and CSS course for absolute beginners. Learn page structure, links, images, tables and forms, then colours, fonts, the box model, Flexbox, Grid and responsive design, with live previews, exercises with solutions and a quiz in every lesson. Finish by building your own portfolio website.
- lessons
- 13
- lessons
- final project
- 1
- final project
- of learning
- 11 hours
- of learning
- level
- Beginner
- level
Who this course is for
- Complete beginners who want to build their own web pages
- Students and job-seekers starting towards front-end, full-stack or UI design roles
- Small business owners, teachers and bloggers who want to edit their own sites with confidence
- Python, data or design learners who want to understand how the web works
What you will be able to do
- Write valid, semantic HTML pages with headings, lists, links, images, tables and forms
- Style pages with CSS: colours, fonts, spacing, borders and reusable variables
- Lay out pages with Flexbox and Grid
- Make pages responsive for phones, tablets and laptops with mobile-first media queries
- Check your work for accessibility and validity, and publish a site for free
- Build a complete responsive portfolio website
Before you start
Skills you need
- Basic computer use: creating folders, saving files and switching between programs
- No coding experience needed
Cost and accounts
Free. No account, card or paid software needed to learn.
Setup time
About 10 minutes to install VS Code and create your first file (lesson 1).
Tools
- A code editor: Visual Studio Code ↗Free for Windows, macOS and Linux. Lesson 1 shows how to set it up. Any plain-text editor also works.
- A modern web browserChrome, Edge, Firefox or Safari. You already have one.
- A laptop or desktop computerPhones are fine for reading the lessons, but you need a computer to write and save files.
- GitHub account (optional) ↗Only if you want to publish your site online in lesson 13. Free.
Checked with
- Every HTML example is checked automatically with html-validate 11.22.1 (HTML standard and WCAG accessibility rules)
- Every CSS example is checked with css-tree 3.2.1 for valid syntax, properties and values
- Every live preview was viewed in Google Chrome 158 at phone (360px) and desktop widths
Last reviewed: 25 November 2026
Syllabus
Module 1: HTML, the structure of a page
Build pages with headings, text, lists, links, images, semantic regions, tables and forms.
- 1How websites work and your first web pageLearn what HTML and CSS do, set up a free code editor, and build and open your very first web page in a browser, step by step, on Windows, macOS or Linux.35 min
- 2Elements, headings and paragraphsUnderstand HTML elements, tags and attributes, then structure text with headings h1 to h6, paragraphs, line breaks, emphasis and comments, the way real pages do.30 min
- 3Lists, links and imagesAdd bulleted and numbered lists, link pages together with relative and absolute links, and show images with useful alt text and the right file paths.35 min
- 4Page structure and semantic HTMLOrganise a whole web page with semantic HTML: header, nav, main, section, article, aside and footer, plus div and span, and see the page as a tree of elements.30 min
- 5Tables and formsShow data in accessible HTML tables with captions and header cells, and build forms with labels, text boxes, email fields, radio buttons, checkboxes, drop-downs and a submit button.40 min
Module 2: CSS, the look of a page
Colours, fonts, selectors, the cascade, the box model, units and variables.
- 6CSS basics: colours, fonts and your first stylesheetWrite your first CSS rules, link an external stylesheet to your HTML, and change text colour, background colour, fonts, font sizes, line spacing and alignment.35 min
- 7Selectors, classes and the cascadeStyle exactly the elements you want with type, class, descendant, grouped and hover selectors, and learn how the cascade and specificity decide which CSS rule wins.35 min
- 8The box model: spacing, borders and sizesEvery element is a box. Control its padding, border, margin, width and height, use box-sizing border-box, centre a page with margin auto, and understand block and inline display.35 min
- 9Units, backgrounds and CSS variablesChoose the right CSS unit (px, rem, %, vw, ch), add background images, gradients and shadows, and keep your colours and spacing consistent with CSS custom properties.30 min
Module 3: Layout, responsive design and quality
Flexbox, Grid, responsive design, accessibility checks and publishing.
- 10Flexbox: lining things up in a row or columnUse CSS Flexbox to build navigation bars, centred content and rows of cards: display flex, justify-content, align-items, gap, flex-wrap and flex-grow, with live examples.40 min
- 11CSS Grid: rows and columns togetherBuild two-dimensional layouts with CSS Grid: columns with fr units and repeat(), gaps, items that span columns, auto-fitting card grids and whole-page layouts with named areas.40 min
- 12Responsive design and media queriesMake pages that work on phones, tablets and laptops: the viewport meta tag, mobile-first CSS, media queries, flexible images and testing with your browser's device mode.40 min
- 13Accessibility, checking your work and publishingMake your pages usable by everyone with an accessibility checklist, check them with the W3C validator and Lighthouse, add search-friendly titles and descriptions, and publish free on GitHub Pages.40 min
Module 4: Final project
Build, test and publish your own portfolio website.
Final project
Responsive portfolio website
A one-page portfolio with a navigation menu, introduction, projects grid, skills, contact form and footer that works on every screen size.
You complete the course when every lesson is marked complete and your project passes its self-check rubric.
Prerequisites
None. This course starts from zero.
This course prepares you for
- JavaScript for Beginners · Add interactivity to the pages you can now build and style.
- Python for Beginners · Learn programming basics in a beginner-friendly language, useful for web back ends, data and AI.