JomMula

Frontend Development: HTML to React · HTML · Lesson 01

How the web works (and your first page)

Before we write anything, let's see what actually happens when a browser opens a website — then build your first real page in about five minutes.

6 min readHTMLsetupno codeUpdated October 2026

Welcome to the start of the whole thing.

By the end of this course you’ll have built a calorie calculator three times: once with plain HTML and CSS, once with JavaScript, and once with React. Same app, three levels of understanding. The first version won’t calculate anything — it’ll just look like a real page. That’s on purpose.

But before any of that, let’s answer the question everyone skips:

What actually happens when you open a website?

You type an address, hit Enter, and a page appears. Under the hood, it’s a short conversation:

  1. The browser asks a server for a file. Usually that file is called index.html.
  2. The server sends the HTML back. HTML is just text with tags that describe what each piece of content is.
  3. The browser reads the HTML and builds the page structure.
  4. It notices links to CSS and JavaScript and asks for those too.
  5. CSS makes it look right. JavaScript makes it do things.

That’s the whole loop. Everything else — frameworks, databases, APIs — sits on top of those five steps.

What you need

You don’t need Node, npm, or any build tools yet. For the first two parts, a browser and a text editor are enough.

Requirements checklist

0/4 done

Your first page

Let’s make a file and open it. No server, no installation, no magic.

  1. 1

    Create a folder

    Make a new folder called frontend-course. This is where every file for the first two parts will live.

  2. 2

    Open it in VS Code

    File → Open Folder, then pick the folder you just made.

  3. 3

    Create index.html

    The name matters. Browsers look for index.html by default when you open a folder.

  4. 4

    Paste this in

    This is the smallest complete page you can write.

                  <!doctype html>
    <html lang="en">
      <head>
        <meta charset="utf-8">
        <title>My first page</title>
      </head>
      <body>
        <h1>Hello, world!</h1>
        <p>This is my first page. I made this.</p>
      </body>
    </html>
                
  5. 5

    Open it in the browser

    Double-click index.html, or right-click it and choose Open with → your browser. You should see a big heading and a paragraph.

That’s a real website. It’s not online yet — it’s just a file your browser can read — but the structure is exactly the same as every page you’ve ever visited.

Try it yourself

This playground is a tiny browser. Edit the HTML on the left, press Run, and look at the right. Try changing the heading and adding a second paragraph.

Preview

Edit the code, then hit Run (or Ctrl + Enter) and watch the preview. This is a safe sandbox — you can't break the page.

Your first mission

the plan's verify step

Change the heading to your own name. Add a paragraph that says what you want to build. Then open the page in your browser and open DevTools (right-click → Inspect) — find your heading in the Elements panel.

If the page doesn't change, save the file first (Ctrl/Cmd + S), then refresh the browser.

What we’re building

Here’s the app we’ll grow across the course:

  • A form for age, sex, height, weight, and activity level.
  • A daily calorie target calculated from those numbers.
  • A food log where you add meals and see the total.
  • A saved log that survives a page refresh.

In this part we’ll build the HTML skeleton only. It will look boring. That’s fine — structure first, style second, behavior third.

A website is just files the browser asks for and reads.

HTML is structure, CSS is style, JavaScript is behavior.

index.html is the default file a browser looks for.

You don't need any build tools to write your first page.

Tags usually come in pairs: opening, content, closing.

Next up: text, links, images, and lists — the tags you’ll use in almost every page you ever build.

02

Up next

Text, links, images, and lists

The small set of tags that covers most of the web: headings, paragraphs, emphasis, links, images, and lists. Learn these and you can structure almost anything.

Read now