HTML Editors

You can write HTML in any plain text editor. A simple one is perfect while you are learning.

You do not need special software to write HTML. Any editor that saves plain text will do, from the one already on your computer to a full code editor.

Editors You Can Use

  • Notepad on Windows, or TextEdit on Mac, both already installed.
  • A code editor like VS Code once you want color highlighting and auto-complete.
  • Any editor that can save a plain .html file works fine.

Writing Your First File

Type your HTML, then save the file with a .html ending. When you open that file in a browser, it renders as a web page.

Save this as index.html

<!DOCTYPE html>
<html>
<body>
  <h1>My saved page</h1>
  <p>If you can read this, it worked.</p>
</body>
</html>

Opening the Page

Find the file you saved and double-click it, or drag it onto an open browser window. The browser reads the HTML and shows the page.

Note: Make sure the file ends in .html and not .txt, otherwise the browser shows the code as plain text instead of a page.
Note: A code editor colors your tags and warns about mistakes, which makes larger files much easier to work with later.

Exercise: HTML Editors

What is a key advantage of using a code editor with syntax highlighting for HTML?