Skip to main content

HTML Basics

HTML Editors

Written by Updated HTML Editors exercises

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:

  1. Open Notepad. On Windows, press Windows + R, type notepad and press Enter.
  2. Type the code shown below.
  3. Click File → Save As.
  4. Change "Save as type" to All Files. If you skip this, Notepad saves the file as index.html.txt and it will not open as a web page.
  5. Name it index.html and save.
  6. 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

EditorPlatformGood to know
Visual Studio Code (VS Code)Windows, macOS, LinuxFree, by Microsoft. The most popular choice, with extensions for almost everything.
Sublime TextWindows, macOS, LinuxVery fast and light. Free to try, paid licence.
Notepad++WindowsA simple, free step up from Notepad.
WebStormWindows, macOS, LinuxA 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

Check your answer to see it here.