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.
7 minute lesson
You only need a text editor and a browser to create an HTML page.
Create a new folder named html-course. Inside it, create a file named index.html.
Add this markup:
<h1>My first page</h1>
<p>Hello from an HTML file.</p>
Save the file, then open it in your browser. You can double-click it in your file manager or drag it into a browser window.
The address will start with file:// instead of https://. That is expected. The browser is reading the document from your computer rather than requesting it from a web server.
Change the paragraph, save the file, and refresh the page. This edit-save-refresh loop is the simplest web development setup you can have.
The .html extension matters. It tells your operating system and tools that this is an HTML document.
Our tiny example works, but it is only a fragment. A complete HTML document contains a few more elements. We’ll add them in the next lesson.
Lesson completed