Your first document

Create an HTML file

Create a small HTML file, open it directly in a browser, and make your first edit without needing a framework or web server.

You do not need a framework, a build step, or a web server to write HTML. A text editor and a browser are enough.

Create a folder named html-course on your computer. Inside it, create a file named index.html. Any plain-text editor works: VS Code, Cursor, Sublime Text, or even TextEdit if you save as plain text.

Paste this markup:

<h1>My first page</h1>
<p>Hello from an HTML file.</p>

Save the file, then open it in your browser. Double-click it in your file manager or drag it into a browser window.

You should see a large “My first page” heading and a paragraph below it. The address bar will show something like file:///Users/you/html-course/index.html. That file:// prefix is normal. The browser is reading the document from your disk, not downloading it from a server.

Change the paragraph text, save, and refresh the page. You should see the update right away. This edit-save-refresh loop is the simplest web development workflow there is. I still use it when I want to test a small HTML snippet quickly.

The .html extension matters. It tells your operating system and your tools that this file contains HTML. Some editors use it to pick syntax highlighting and helpful completions.

A common mistake is saving the file as index.html.txt because the editor hides extensions. The browser may still open it, but your tools will not treat it as HTML. Check the full filename in your file manager if the page looks like plain text.

Our example works in the browser, but it is only a fragment. A real HTML document needs a few more pieces so the browser knows how to interpret the page. We add those in the next lesson. The practice track later moves this work into a my-page folder with the same edit-save-refresh habit.

Lesson completed