Beginner12 min readBadge: Page Builder

HTML and CSS basics: how a web page is built

HTML is the structure, CSS is the look. Learn the handful of tags and styles you'll see in every AI-built page, and how to inspect any site.

Structure and style

Every web page is HTML (what's on the page: headings, text, images, buttons) styled by CSS (how it looks: colours, fonts, spacing, layout). AI builders write both for you, but knowing the basics lets you make quick fixes yourself and describe changes precisely.

HTML in a few tags

  • Headings h1 to h6 and paragraphs p: <h1>Sam's Bakery</h1> <p>Fresh bread daily.</p>
  • Links and images: <a href="/menu">Menu</a> and <img src="rolls.jpg" alt="Tray of cinnamon rolls">
  • Buttons and forms: <button>Book now</button>, <input>, <label>
  • Containers like section and div group things so CSS can lay them out.
  • Tags nest inside each other, and attributes (href, src, alt, class) add details.

CSS in a few ideas

A selector picks elements and rules style them: h1 { color: navy; font-size: 32px; }. Every element is a box: padding is space inside its border, margin is space outside. Flexbox and grid arrange boxes in rows and columns, and media queries change the layout on small screens (responsive design). Tailwind classes like p-4 or text-lg are shortcuts for CSS rules.

Inspect any page

In Chrome, Edge, Firefox or Safari, right-click anything and choose Inspect to open the developer tools. You'll see the HTML for that element and the CSS styling it, and you can change values live to experiment. Nothing you change there is saved, so it's a safe sandbox. It's also the fastest way to find the exact element to describe to your AI builder.

Key terms

HTML
The language for a web page's structure: headings, paragraphs, buttons, images.
CSS
The language for how a page looks: colours, fonts, spacing, layout.
Selector (CSS)
The part of a CSS rule that picks which elements to style, like h1 or .button.
Box model
Every element is a box: content, then padding, then border, then margin.
Flexbox
A CSS layout tool for arranging items in a row or column and spacing them out.
Developer tools (Inspect)
Browser tools that show a page's HTML and CSS and let you experiment live; changes aren't saved.
Responsive design
Layouts that adapt to any screen size, from phone to desktop.
Alt text
A short description of an image for screen readers and search engines.
See the full glossary

Try it

Take a page apart

  1. Open any website, right-click a heading and choose Inspect.
  2. Find its tag and one CSS rule; change the colour or text live and watch it update.
  3. Reload the page and notice your change is gone.
  4. Ask your AI builder for one change using the element's class or tag name you found.

Ask an AI tutor about this guide

Copy a prompt into ChatGPT, Claude or Gemini to go deeper. Check what it tells you against the guide.

Study with an AI tutor: copy this whole guide with tutoring instructions, then paste it into your AI assistant.
  • Explain it like I'm 12
  • Quiz me (5 questions, one at a time)
  • Show me a real example for my situation
  • What do beginners get wrong?

Knowledge check

Five questions. Get 4 right to earn the Page Builder badge. You can retake it as often as you like.

Question 1 of 5

What does CSS control?

Finished the How software works guides? Take the How software works track test for ten mixed questions.

My notes

Write what clicked, what confused you, and what you want to try. Saved in this browser only.

Learn it live

Digital Builders University runs small live workshops where you build something real with an instructor beside you, starting with Vibe Coding 101.

See workshops

Practise it

Last reviewed November 25, 2026. AI tools change fast; check each tool’s own site for current features, plans and prices.