Your First Web Page
A web page is just a file. Create index.html, open it in a browser, and meet the live playground.
Here is something that surprises almost everyone: a web page is just a file. Not a special program, not a database — a plain text file, saved with the extension .html, that a browser opens and draws. You can make one right now with two tools you already have (or can get for free):
- A text editor — a program for writing plain text. VS Code (free, from code.visualstudio.com) is what most professionals use. (Not Word or Google Docs: those add hidden formatting that browsers can't read.)
- A browser — Chrome, Firefox, Edge, or Safari. It reads your file and shows the result.
That's the entire toolkit for this course. No installs, no accounts, no build steps.
Your first page takes four steps:
- Make a folder for your site, for example
my-site - Create a file inside it named
index.html - Type an element and save the file (the code is below)
- Open the file in a browser: double-click it, or drag it into a browser window
<h1>Hello, world!</h1>
<p>This is my first web page.</p>The browser shows a big heading and a paragraph. Why index.html? When a visitor opens a website (or a folder on a web server) without naming a file, the server shows index.html by default. It's the universal name for a site's front door, so it's worth using from day one.
You edit index.html in your editor, switch to the browser, and still see the old text. What is the most likely reason?
- AYou have not saved the file and refreshed the browser tab
- BHTML files can only be opened once
- CThe browser needs to be reinstalled
- DThe file must be named page.html
Switching between an editor and a browser is how you'll work on real projects. Inside this course, though, you don't have to: lessons include a live playground. On the left is your code; on the right is exactly what a browser shows, updating as you type. The preview is a real browser frame, sandboxed so nothing you type can leave it.
Try it on the next card. There's no right answer and nothing is graded in a playground: it's a sandbox to poke at ideas, break things, and see what happens.
Make it yours
<h1>Hello, world!</h1>
<p>This is my first web page.</p>A visitor types your site's address with no file name. Which file does the server show by default?
- Aindex.html
- Bhome.html
- Cmain.html
- Dfirst.html
Complete the file name so the browser treats it as a web page:
index.___- A web page is a plain text file with the
.htmlextension; a browser reads it and draws it - You need two tools: a text editor (like VS Code) and a browser
- Name your front page
index.html: servers show it by default - After editing, save the file and refresh the browser to see the change
- The course's live playground shows a real browser preview of your code as you type (practice only, never graded)
Next up: the extra information you can attach to tags — attributes — and the handful of tags that break the opening/closing rule.