What You Need
Writing HTML requires no installation, compiler, or server. You only need a text editor and a web browser — both of which you likely already have.
Recommended Tools
- A code editor — Visual Studio Code is the most popular choice.
- A modern browser — Chrome, Firefox, or Edge.
- Optional: a Live Server extension to auto-refresh the page on save.
Creating Your First File
Create a new file named index.html. The .html extension tells your operating system and browser to treat the file as a web page.
index.html
<!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 HTML page.</p>
</body>
</html>Opening the File
Double-click the file to open it in your default browser, or right-click it and choose "Open with" to pick a specific browser. You can also drag the file directly into an open browser window.
Use a Live Server
Install the "Live Server" extension in VS Code. It runs a local development server and automatically refreshes the browser every time you save a file — a huge time saver.
File Naming
The homepage of most websites is conventionally named index.html because web servers automatically load that file when a folder is requested.
Save With the Right Extension
Make sure your editor saves the file as .html and not .txt. Some editors add a hidden .txt extension by default — enable "show file extensions" in your operating system to verify.
Summary
All you need to start writing HTML is a text editor and a browser. Create an .html file, add some markup, and open it in your browser to see the result instantly.