To start writing HTML, you only need a simple text editor. HTML files are plain text files — any program that can save plain text can be used to write HTML.
What is an HTML Editor?
An HTML editor is a software application for creating web pages. It allows you to write and edit HTML code. There are two main types:
Plain Text Editors — Simple editors like Notepad (Windows) or TextEdit (Mac) where you write raw code
Code Editors / IDEs — Smart editors like VS Code with syntax highlighting, auto-complete, error detection, and many tools to help you code faster
Writing HTML Using Notepad (Windows)
You can write HTML using the simplest text editor — Notepad. Here is how:
Step 1 — Open Notepad
On Windows, open Notepad by searching for it in the Start menu.
Step 2 — Write HTML Code
Type the following HTML in Notepad:
<!DOCTYPE html>
<html>
<head>
<title>My First Page</title>
</head>
<body>
<h1>Hello World!</h1>
<p>This is my first HTML page.</p>
</body>
</html>
Step 3 — Save the File
Save the file with a .php extension:
Go to File → Save As
Set the file name to index.php
Set Save as type to All Files
Click Save
Step 4 — Open in a Browser
Find your saved file, right-click it, and choose Open with → Browser. Your page will display in the browser!
Writing HTML Using TextEdit (Mac)
On Mac, you can use TextEdit to write HTML:
Open TextEdit and go to Preferences → Format and choose Plain Text
Write your HTML code
Save the file as index.php
Open the file in your browser
Professional HTML Editors
For a much better coding experience, professionals use dedicated code editors. These editors offer:
Syntax highlighting — different colors for tags, attributes, and values
Auto-complete — suggests code as you type
Error detection — highlights mistakes in real time
Live preview — see your page as you write
Extensions — add extra tools and features
Editor
Platform
Best For
Free?
VS Code
Windows, Mac, Linux
Everyone — Most popular
Free
Sublime Text
Windows, Mac, Linux
Fast & lightweight coding
Free (paid license optional)
Notepad++
Windows only
Beginners on Windows
Free
Atom
Windows, Mac, Linux
Customizable editor
Free
Brackets
Windows, Mac, Linux
Front-end web design
Free
Recommended: Visual Studio Code (VS Code)
For beginners and professionals alike, VS Code is the most recommended HTML editor in the world. Here is why:
Completely free and open-source
Has IntelliSense — smart auto-complete for HTML tags
Built-in Emmet support — type shortcuts and expand to full HTML
Huge library of extensions (e.g. Live Server to auto-refresh your page)
Works on Windows, Mac, and Linux
Tip: Install the Live Server extension in VS Code. It automatically refreshes your browser every time you save your HTML file — very useful when learning!
Online HTML Editors
You can also write and test HTML directly in your browser using online editors — no installation needed:
CodePen — codepen.io
JSFiddle — jsfiddle.net
W3Schools Tryit — w3schools.com/tryit
For Beginners: Start with Notepad to understand raw HTML, then move to VS Code when you are comfortable with the basics.