HTML Editors
On this page
You can learn HTML using any text editor. A simple editor helps you focus on the code instead of tools and features.
Text Editors vs. Code Editors
Professional code editors provide features like syntax highlighting and auto-complete. However, a basic text editor is enough to learn how HTML works.
Using Notepad (Windows)
On Windows, you can use Notepad to create and edit HTML files.
Open Notepad: - Windows 8 or later: Open Start and type "Notepad" - Windows 7 or earlier: Start → Programs → Accessories → Notepad
Using TextEdit (macOS)
On macOS, TextEdit can be used as a plain text editor.
Open TextEdit: - Finder → Applications → TextEdit Recommended settings: - Format → Make Plain Text - Preferences → Open and Save → enable: "Display HTML files as HTML code instead of formatted text"
Writing Your First HTML
Create a new file and write a basic HTML document.
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
Saving the File
Save the file with an .html or .htm extension and use UTF-8 encoding.
File name: index.html Encoding: UTF-8
Viewing in a Browser
Open the saved file in a web browser to see the result.
- Double-click the file - Or right-click → Open with → choose a browser
Notes
Using a simple editor makes it easier to understand how HTML files work and how browsers read markup.