Toolpuffin

    Loading...

    Up and down to choose, Enter to open, Esc to close.

    How to Learn HTML and CSS as a Beginner: A Simple Plan

    Updated November 2026

    Written by the Toolpuffin team. Tools in this guide are tested in the browser.

    HTML and CSS are the two languages every web page is built from. You can learn the basics in a few evenings if you practise by typing code and seeing what happens. This guide explains what each one does, in which order to learn things, and where to practise.

    Try the tool: Learn HTML and CSS

    What HTML and CSS do

    HTML says what is on the page: headings, paragraphs, links, pictures and lists. CSS says how it looks: colours, spacing, fonts and layout. A page without CSS still works, it just looks plain.

    • HTML uses tags, such as <p> for a paragraph and <h1> for the main heading.
    • CSS uses rules, such as h1 { color: teal; }, that say which tags get which look.

    What to learn first

    1. Tags: opening and closing tags, and paragraphs.
    2. Headings, and bold and italic text.
    3. Links and pictures, including the alt text.
    4. Lists with bullets or numbers.
    5. Colours with CSS.
    6. Space around and inside boxes: margin, padding and border.
    7. Putting boxes side by side with flexbox.
    8. Building a small page of your own that uses all of this.

    How to practise

    Reading about code only goes so far. Type every example yourself, change one thing and look at what moves. When something breaks, that is part of learning: check that every tag is closed and every CSS line ends with a semicolon.

    The mini course above has 8 short lessons. Each one gives you a task, shows the result next to your code and checks your answer. Which lessons you finished is remembered in your browser. The code you type is not stored.

    Common mistakes

    • Forgetting a closing tag, so the rest of the page ends up inside the wrong element.
    • Forgetting the semicolon at the end of a CSS line.
    • Leaving out the alt text on a picture.
    • Using headings only to make text bigger. Use CSS for size and headings for structure.

    What to learn next

    After the basics, continue with Learn HTML and CSS: Part 2. It covers tables, forms, the structure of a page, fonts, centring, hover effects, a page that fits on a phone and CSS grid. After that, learn a little JavaScript to make pages react to clicks. Two free tools help along the way: the HTML formatter tidies messy code and the CSS minifier shrinks a finished style sheet.

    • Build the same small page three times, each time a bit better.
    • Look at how other pages are built: most browsers let you inspect a page with the right-click menu.

    More guides