Skip to main content
← Back

What a website is made of

How the Web Works
Lesson 3 of 4
Updated: 2026-11-10

We know websites are files stored on servers, and domain names help us find them. But what's inside those files?

Almost every website is built with three languages working together.

Wait, "languages"?

Not English or Igbo. Here, a language is a set of written instructions a computer understands.

A website is a list of instructions for your browser: "Put a heading here. Make it blue. When someone clicks this button, show a message." The browser reads them and builds the page you see.

Think of building a house

  1. Structure: walls, rooms, doors. The house exists, but it's bare blocks.
  2. Finishing: paint, tiles, furniture. Now it looks good.
  3. Wiring: switches, taps, a doorbell. Now it does things.

A website is built the same way:

HouseWebsiteLanguage
StructureWhat's on the page: headings, text, images, buttonsHTML
FinishingHow it looks: colours, fonts, spacing, layoutCSS
WiringWhat happens when you interact: menus, form checks, slidersJavaScript

HTML: the structure

HTML tells the browser what each thing is: a heading, a paragraph, an image, a link. No HTML, no website.

<h1>Welcome to my shop</h1>
<p>We sell notebooks and planners.</p>

Don't worry about understanding it yet; the next track covers it. On its own, HTML looks plain: black text on white, stacked top to bottom.

CSS: the style

CSS tells the browser how things should look: colours, sizes, spacing, layout, and how the page adjusts on a phone.

h1 {
  color: purple;
  font-size: 40px;
}

That means: "Make every main heading purple and large." Two sites with the same HTML can look completely different because of their CSS, like two houses with the same floor plan.

JavaScript: the behaviour

JavaScript tells the browser what to do when you click, type, scroll or tap. For example:

  • A menu that opens when you tap ☰ on your phone
  • A form that warns "Please enter a valid email"
  • A cart total that updates when you add an item

Not every site needs it. A simple page with text and pictures works fine with just HTML and CSS.

What else is in the folder?

Images, fonts, and any videos or documents the site offers. The server sends all these files to your browser, which puts them together into one page.

See it for yourself

On a laptop, open any website in Chrome, right-click an empty spot and choose View Page Source. That wall of text is the HTML (with some CSS and JavaScript mixed in). It looks confusing now; by the end of this class, you'll recognise much of it.

Activity

  1. Open a website you like.
  2. Write down:
    • Two HTML examples: things on the page (a heading, an image, a button)
    • Two CSS examples: how something looks (a colour, a font, a layout)
    • One JavaScript example: something that reacts when you interact (a menu, a slider, a pop-up)
  3. On a laptop, try View Page Source on that site and spot some of the text you saw on the page.
Download this lesson:.md.txt