- Home
- /
- Tutorials
- /
- HTML Tutorial
- /
- HTML Editors
HTML Basics
HTML Editors
You do not need special software to write HTML. Notepad works. But a proper code editor colors your code, closes your tags and catches typos, and that saves beginners hours.
What Is an HTML Editor?
An HTML editor is simply where you type your code. Any program that saves plain text will do. A code editor is a text editor with extras built for programming.
Start with what you already have
Every computer has a plain text editor: Notepad on Windows, TextEdit on Mac. Here is how to make your first page with Notepad:
- Open Notepad. On Windows, press
Windows + R, typenotepadand press Enter. - Type the code shown below.
- Click File → Save As.
- Change "Save as type" to All Files. If you skip this, Notepad saves the file as
index.html.txtand it will not open as a web page. - Name it
index.htmland save. - Double-click the file. It opens in your browser as a web page.
html
<!DOCTYPE html>
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<h1>Welcome to HTML!</h1>
<p>This is my first web page created in Notepad.</p>
</body>
</html>On a Mac, TextEdit saves rich text by default. Choose Format → Make Plain Text before saving, or your HTML will be saved as formatting instead of code.
Why most people switch to a code editor
- Syntax highlighting (different colors for tags and text)
- Auto-completion (finishes tag names for you)
- Error detection (detects any error and flag it in red color)
- Live preview (see output instantly while typing)
Live preview alone is worth it: you save the file and the browser refreshes by itself.
Popular HTML Editors
| Editor | Platform | Good to know |
|---|---|---|
| Visual Studio Code (VS Code) | Windows, macOS, Linux | Free, by Microsoft. The most popular choice, with extensions for almost everything. |
| Sublime Text | Windows, macOS, Linux | Very fast and light. Free to try, paid licence. |
| Notepad++ | Windows | A simple, free step up from Notepad. |
| WebStorm | Windows, macOS, Linux | A full IDE by JetBrains, free for non-commercial use. |
You may still see Atom and Brackets in older tutorials. Both have been discontinued, so pick one of the editors above.
Setting up VS Code
- Download it from code.visualstudio.com and install it.
- Open a folder for your project, then create a file called
index.html. - Type
!and press Tab. VS Code writes the whole basic page structure for you. - Install the Live Server extension, then click Go Live at the bottom to see your page update every time you save.
No installation at all
If you just want to try something quickly, use our Try It Editor. Type HTML on one side and see the result on the other, right in your browser. It is perfect for testing the examples in these lessons.
HTML Editors exercises
Your first page body
Write a main heading that says My Page and below it a paragraph that says Written in an editor.
Result
