
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
h1toh6, paragraphsp, linksa, imagesimg, - lists
ul,olandli, - 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:
- A header with your name and a short line about you.
- A section with three skills or interests.
- A project section with images and links.
- A contact form.
- 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.


