Ad – 728Γ—90
🌐 Beginner

Setting Up HTML – Everything You Need to Start

One of the best things about HTML is how little you need to start. Unlike Python (which needs an interpreter) or JavaScript in Node.js (which needs npm), HTML runs directly in your browser β€” a program you already have. This lesson covers the two-minute setup to write and preview HTML, then walks through the recommended professional setup: VS Code with the right extensions and browser developer tools that will serve you throughout your entire web development career.

⏱️ 12 min read 🎯 Beginner πŸ“… Updated 2026

The Minimum Setup – 2 Minutes

You literally need only two things:

  1. A text editor β€” any app that saves plain text: Notepad (Windows), TextEdit (Mac, set to plain text mode), gedit (Linux). These are pre-installed on your computer.
  2. A web browser β€” Chrome, Firefox, Safari, or Edge. Already installed.

That's it. Create a file, save it with a .html extension, double-click it, and it opens in your browser. This works right now, before installing anything.

πŸ’‘
Try it right now

Open Notepad (Windows) or TextEdit (Mac). Type <h1>Hello HTML!</h1>. Save as test.html (make sure the extension is .html, not .txt). Double-click the file. Your browser opens and shows a large bold heading. You just ran your first HTML page.

The Recommended Setup – VS Code (Free)

While any text editor works, Visual Studio Code (VS Code) is the industry-standard editor for web development. It is free, open-source, available on Windows, Mac, and Linux, and has superb HTML support built in.

Installing VS Code

  1. Go to code.visualstudio.com in your browser.
  2. Click the download button for your operating system (Windows, macOS, or Linux).
  3. Run the installer. Accept the defaults β€” optionally check "Add to PATH" and "Open with Code" context menu entries on Windows.
  4. Open VS Code. You are ready.
ℹ️
VS Code already knows HTML

VS Code has HTML support built in: syntax highlighting, tag autocompletion (Emmet), tag closing, bracket matching, and hover documentation. You do not need to install anything for basic HTML. The extensions below add even more productivity features.

Recommended VS Code Extensions for HTML

ExtensionWhat it doesPriority
Live Server
by Ritwick Dey
Launches a local server and auto-refreshes your browser every time you save your HTML file. Eliminates the need to manually refresh. Indispensable. πŸ”΄ Install first
Prettier
by Prettier
Auto-formats your HTML on save β€” consistent indentation, quote style, and attribute alignment. Keeps code readable. πŸ”΄ Install first
Auto Rename Tag
by Jun Han
When you rename an opening tag, the closing tag updates automatically. Saves many keystrokes when refactoring. 🟑 Highly recommended
HTML CSS Support
by ecmel
Autocompletion for CSS class names defined in your stylesheets. Type a class name in HTML and it offers completions from your .css files. 🟑 Highly recommended
Highlight Matching Tag
by vincaslt
Highlights the matching opening/closing tag when your cursor is on one β€” crucial for navigating deeply nested HTML. 🟒 Useful
Path Intellisense
by Christian Kohler
Autocompletes file paths in src="" and href="" attributes. Prevents typos in image and link paths. 🟒 Useful
Ad – 336Γ—280

Emmet – Write HTML 10x Faster

VS Code has Emmet built in β€” a shorthand system for writing HTML. You type a short abbreviation, press Tab, and it expands to full HTML:

Emmet Abbreviations β†’ HTML
! β†’ Full HTML5 document boilerplate
h1 β†’ <h1></h1>
p β†’ <p></p>
a β†’ <a href=""></a>
img β†’ <img src="" alt="">
ul>li*3 β†’ <ul><li></li><li></li><li></li></ul>
div.container β†’ <div class="container"></div>
div#header β†’ <div id="header"></div>
nav>ul>li*4>a β†’ navigation with 4 list items each containing a link
input[type="email"] β†’ <input type="email">
table>tr*3>td*4 β†’ table with 3 rows and 4 cells each

The most useful shortcut: type ! in an empty .html file and press Tab. VS Code generates the complete HTML5 boilerplate in one keystroke.

Using Live Server

After installing the Live Server extension:

  1. Open your HTML file in VS Code.
  2. Click the "Go Live" button in the bottom-right status bar, OR right-click in the editor and choose "Open with Live Server".
  3. Your browser opens at http://127.0.0.1:5500/yourfile.html.
  4. Every time you save the file (Ctrl+S / Cmd+S), the browser refreshes automatically.
⚠️
Use Live Server β€” not double-click

Opening an HTML file by double-clicking runs it under the file:/// protocol. Some features (JavaScript modules, fetch API, web fonts) are blocked for security when using file://. Live Server runs a proper local HTTP server at localhost:5500, which behaves like a real web server. Use Live Server from day one so you never hit mysterious security errors.

Browser Developer Tools

Every modern browser has built-in developer tools β€” one of the most powerful learning and debugging tools available. Open them with F12 (or right-click any element β†’ Inspect).

DevTools PanelWhat you use it for in HTML/CSS
ElementsView the live DOM tree, inspect and edit HTML elements and attributes in real time, see how the browser interpreted your HTML
StylesView and edit CSS rules applied to selected elements β€” changes are instant and reflected in the browser (but not saved to your file)
ConsoleSee JavaScript errors and warnings, run JavaScript snippets to interact with the page
NetworkSee every resource the browser loads (HTML, CSS, JS, images) and how long each takes
Device toolbarSimulate mobile screens β€” test how your HTML responds at different screen sizes (iPhone, iPad, etc.)

Online HTML Editors – Zero Install

If you want to practise HTML without any local setup at all, these online editors let you write and preview HTML immediately in your browser:

EditorBest for
CodePen (codepen.io)Quick HTML + CSS + JS experiments; sharing code snippets; viewing other people's work
JSFiddle (jsfiddle.net)Testing HTML + CSS + JS combinations; simple live preview
StackBlitz (stackblitz.com)Full project setups in the browser; supports npm packages; excellent for frameworks
CodeSandbox (codesandbox.io)Full project environments; React, Vue, OWL JS; share entire projects via URL

πŸ“‹ Summary

  • Minimum setup: any text editor + any browser. Save as .html and open in browser.
  • Recommended: VS Code (free) + Live Server extension for auto-reload + Prettier for auto-formatting.
  • Type ! + Tab in VS Code to generate a full HTML5 boilerplate instantly (Emmet shortcut).
  • Use Live Server (localhost:5500) rather than double-clicking files β€” avoids file:// protocol issues.
  • Open browser DevTools with F12 β€” the Elements panel lets you inspect and live-edit any page's HTML and CSS.
  • Online options: CodePen, JSFiddle, StackBlitz β€” write HTML in your browser with zero installation.

πŸ‹οΈ Exercise

Set up your HTML environment right now:

  1. Install VS Code if you haven't already.
  2. Install the Live Server extension.
  3. Create a folder called html-practice on your Desktop.
  4. Open that folder in VS Code (File β†’ Open Folder).
  5. Create a new file: index.html.
  6. Type ! and press Tab β€” Emmet generates the boilerplate.
  7. Inside <body>, add an <h1> with your name and a <p> with a sentence about yourself.
  8. Click "Go Live" in the status bar and verify it opens in your browser.
  9. Change the heading text, save the file, and watch the browser update automatically.