Universal Tutor HubFuture skills, school & wellbeing
Coding & Software

HTML and CSS Explained: How Web Pages Are Built

HTML and CSS Explained: How Web Pages Are Built
Quick answer

HTML structures the content of a web page using elements like headings, paragraphs, links, images and forms. CSS controls how that content looks: colours, fonts, spacing and layout. Together they form the foundation of every website. Beginners can build a simple page in an afternoon and a polished, responsive site in a few weeks.

HTML: the structure

HTML (HyperText Markup Language) describes what content is. Elements are written with tags:

<h1>My Portfolio</h1>
<p>I build websites and automations.</p>
<a href="/contact">Contact me</a>

Important elements to learn first:

  • headings h1 to h6, paragraphs p, links a, images img,
  • lists ul, ol and li,
  • semantic sections: header, nav, main, section, article, footer,
  • forms: form, input, label, button.

Semantic HTML (using the right element for the right content) helps accessibility, search engines and AI systems understand your page.

CSS: the presentation

CSS (Cascading Style Sheets) describes how content looks:

h1 { color: #10204F; font-size: 2.5rem; }
p { line-height: 1.6; max-width: 65ch; }

Key concepts:

  • Selectors: choosing what to style (elements, classes, IDs).
  • The box model: content, padding, border and margin.
  • Typography: fonts, sizes, line height.
  • Colour and contrast.
  • Layout: Flexbox for one-dimensional layouts, Grid for two-dimensional layouts.
  • Responsive design: media queries and flexible units so pages work on phones.

Responsive and accessible from the start

Most visitors browse on phones. Design mobile-first, test at small widths and avoid fixed widths. Make sites accessible: alt text on images, labels on form fields, enough colour contrast, and keyboard-friendly navigation.

Your first project

Build a one-page personal profile:

  1. A header with your name and a short line about you.
  2. A section with three skills or interests.
  3. A project section with images and links.
  4. A contact form.
  5. Style it with a consistent colour palette and make it work on mobile.

Publish it free using a static hosting service and share the link. See how to build a portfolio website.

Next steps

Learn JavaScript to add interactivity, and understand how websites work behind the scenes. Our web development course takes you from first page to full-stack apps.

Frequently asked questions

Is HTML a programming language?

Technically, HTML is a markup language: it describes structure rather than logic. It is still essential for web development.

How long does it take to learn HTML and CSS?

Basics take a couple of weeks. Mastering layout and responsive design takes a few months of practice.

Should I use a CSS framework?

Learn plain CSS first. Frameworks like Tailwind are useful later.

Future Skills Faculty, AI, software and digital skills instructors

Our Future Skills Faculty are working developers, data specialists, designers, marketers and automation engineers who teach AI and technology courses at Universal Tutor Hub. Every guide is written and reviewed by instructors who use these tools in paid client work.

Book a free demo session

Meet your tutor, get a personal learning plan and decide with no pressure. No card required.

WhatsAppFree demo