Getting Started Lesson 2 of 42
Getting Started — Writing Your First HTML File
How to write, save and open your first HTML file using Notepad, VS Code, or just your phone. Step-by-step for students with or without a laptop.
In the last lesson you saw HTML inside this website's editor. Now let's make a real HTML file on your own device, save it, and open it in a browser. This is exactly what web developers do every day, just on a bigger scale.
Don't have a laptop? No problem. Many Filipino students learn coding on a phone first, and that is okay. This lesson covers both.
What you need
- A text editor — a program for typing plain text. It must save plain text, not formatted text like Microsoft Word.
- A web browser — Chrome, Edge, Firefox or Safari. You already have one.
That's it. HTML is free to write and free to open.
Option 1: Notepad (Windows, already installed)
- Open the Start menu, type Notepad, and open it.
- Type or paste the code below.
- Click File → Save As.
- Choose a folder you can find again, like Documents. Create a folder named my-website.
- For the file name, type index.html.
- Change "Save as type" to All Files, and set Encoding to UTF-8. Click Save.
- Open the folder and double-click index.html. It opens in your browser!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My First Web Page</title>
</head>
<body>
<h1>Hello, Philippines!</h1>
<p>This is my very first web page.</p>
<p>I made it myself using HTML.</p>
</body>
</html>
Option 2: Visual Studio Code (recommended)
VS Code is a free editor made by Microsoft and used by professional developers around the world. It colors your code so it is easier to read, and it can finish tags for you.
- Download it from the official site, code.visualstudio.com. It works on Windows, Mac and Linux.
- Open VS Code, then File → Open Folder and pick your my-website folder.
- Create a new file named index.html.
- Type ! then press Tab or Enter. VS Code writes a whole starter page for you. This shortcut is called Emmet.
- Save with Ctrl + S, then open the file in your browser.
Option 3: Using only a phone
If you only have an Android phone or an iPhone, you can still practice:
- Use this website. Every lesson has a Try it yourself editor, and the Playground lets you write a full page and even download it as index.html.
- Use a code editor app. On Android, search the Play Store for an "HTML editor" app that lets you save .html files and preview them. On iPhone, there are similar apps in the App Store. Choose one with good reviews and no unnecessary permissions.
Typing tags on a phone keyboard is slower, but it works. Many good programmers started this way.
Saving and refreshing: the basic workflow
Whatever editor you use, the routine is always the same:
- Edit the code in your editor.
- Save the file (Ctrl + S on Windows, Cmd + S on Mac).
- Refresh the browser (F5 or the ↻ button) to see the change.
If your change does not show up, nine times out of ten you forgot to save. Check the editor tab: many editors show a dot ● when there are unsaved changes.
Why name it index.html?
When someone visits a website folder without naming a file, the web server looks for a file named index.html first. That's why the homepage of almost every website is an index.html file. Use lowercase letters and no spaces in file names. Instead of My Page.html, write my-page.html.
Organizing your project folder
Keep things neat from day one. A simple website folder looks like this:
my-website/
├── index.html
├── about.html
├── contact.html
└── images/
├── logo.png
└── team-photo.jpg
All your pages are in one folder, and pictures go in an images folder. We will use this structure in the lessons on links and images.
Quick Quiz
Check what you learned. Walang grade ito, practice lang. 🙂
By Sir Reyel · Last updated 2026-12-04