Setting Up Your HTML5 Workflow
Before writing HTML, it helps to build a simple, reliable workflow. Good tools make it easier to write clean markup, preview pages quickly, organize project files, and catch mistakes early.
This chapter focuses on the practical setup every beginner needs:
- installing VS Code
- opening a project folder
- creating and saving HTML files correctly
- previewing static pages in a system browser
- using a live-reload preview tool
What You Need
For beginner HTML projects, you only need a few things:
- a code editor
- a web browser
- a folder for your project files
- an easy way to preview your pages
Recommended tools:
- VS Code for editing
- Chrome, Firefox, Edge, or Safari for testing
- Live Server or a similar extension for automatic browser refresh
Why VS Code Is a Good Choice
VS Code is popular because it is:
- easy to install
- beginner-friendly
- available on Windows, macOS, and Linux
- full of useful features such as syntax highlighting, auto-complete, search, and extensions
You can write HTML in many editors, but VS Code gives you a smoother learning experience.
Installing VS Code
Windows
- Visit https://code.visualstudio.com
- Download the Windows installer
- Open the downloaded
.exefile - Follow the setup steps
- If available, enable options such as:
- add to PATH
- open with Code from the file explorer context menu
- register Code as an editor for supported file types
macOS
- Visit https://code.visualstudio.com
- Download the macOS version
- Open the downloaded archive
- Drag Visual Studio Code into the Applications folder
- Open it from Applications or Spotlight
Linux
The easiest path depends on your distribution. On many systems, you can:
- download the package from the VS Code website
- install the
.debor.rpmpackage using your software installer - or install through a package manager if your distro supports it
The main goal is simple: install VS Code so you can open folders and edit files easily.
Opening VS Code for the First Time
When VS Code opens, you will usually see:
- a welcome screen
- a sidebar on the left
- a large editor area in the middle
- a status bar at the bottom
Key areas to know:
- Explorer: shows files and folders
- Search: finds text across the project
- Source Control: shows file changes if you use Git
- Extensions: lets you install helpful add-ons
Helpful VS Code Features for HTML
VS Code gives you many built-in tools that are useful immediately:
- syntax coloring for tags and attributes
- auto-closing tags
- indentation support
- file search
- multi-file project navigation
- quick rename and editing
For example, if you type:
<p>
VS Code will usually help by inserting the closing tag automatically.
Recommended VS Code Extensions
You can work without extensions, but a few can make beginner HTML work much easier.
Live Server
Purpose:
- opens your page in a browser using a local server
- refreshes the browser when you save
This is one of the most useful beginner extensions for static pages.
Prettier
Purpose:
- formats your code automatically
This helps keep indentation and spacing clean.
Optional Extensions
- HTML CSS Support
- Path Intellisense
- Auto Rename Tag
Use only a few at first. Too many extensions can feel confusing.
How to Install an Extension in VS Code
- Open VS Code
- Click the Extensions icon in the sidebar
- Search for the extension name, such as
Live Server - Click Install
After installation, you may see new buttons or commands related to that extension.
Create a Project Folder
Before creating files, make a dedicated folder for your project.
Example:
my-first-site/
├── index.html
├── about.html
├── contact.html
├── assets/
│ ├── images/
│ ├── audio/
│ └── video/
└── notes/
This keeps your files organized from the start.
Open the Folder in VS Code
Instead of opening a single file by itself, it is better to open the whole project folder.
In VS Code:
- Click File
- Choose Open Folder
- Select your project folder
Why this helps:
- you can see all project files together
- links and image paths are easier to manage
- extensions like Live Server work more smoothly
Create Your First HTML File
Inside the project folder, create a file named index.html.
This is often the default starting page for a website.
Example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My First HTML Page</title>
</head>
<body>
<h1>Hello, HTML5!</h1>
<p>I am ready to build web pages.</p>
</body>
</html>
Save Files Correctly
Always make sure:
- the file ends in
.html - you are saving inside the correct project folder
- your editor is not accidentally saving as plain text
Good file names:
index.htmlabout.htmlcontact.html
Less helpful file names:
my cool webpage final final.htmluntitled.txt
Previewing Static Pages in a System Browser
There are two common ways to preview a static HTML page.
Method 1: Open the File Directly
You can open the file straight in your system browser.
Examples:
- double-click
index.html - right-click the file and choose Open With
- drag the file into Chrome, Firefox, Edge, or Safari
This works well for very simple pages.
Pros
- very easy
- no setup needed
- good for first experiments
Limits
- you may need to refresh the browser manually
- some features behave better when served from a local server
- relative file paths can be harder to debug if your folder structure is messy
Previewing with Live Server
Live Server is often a better workflow for beginners.
Why Use It
- opens the page in your browser
- refreshes automatically when you save
- behaves more like a real local website
Basic Steps
- install the Live Server extension
- open your project folder in VS Code
- open
index.html - click Go Live in the bottom bar or right-click and choose Open with Live Server
Your browser will open a local address that often looks like:
http://127.0.0.1:5500/index.html
or
http://localhost:5500/index.html
When you save your HTML file, the browser usually refreshes automatically.
Choosing a Browser for Testing
Different browsers may render pages slightly differently, so it is smart to test in more than one.
Good choices:
- Chrome for broad compatibility and developer tools
- Firefox for strong standards support and debugging tools
- Edge for another Chromium-based check
- Safari if you want to test macOS and iPhone-like rendering behavior
At minimum, learn in one browser first and then spot-check in another.
Useful Browser Actions While Learning
Refresh the Page
If you are not using Live Server, you will need to refresh the browser manually after saving.
Open Developer Tools
Developer tools help you inspect the HTML structure of your page.
Usually available with:
F12- right-click -> Inspect
- browser menu -> Developer Tools
Useful tabs include:
- Elements or Inspector to see the HTML
- Console for errors
- Network for file loading issues
A Simple Test Workflow
Here is a beginner-friendly loop:
- open your project folder in VS Code
- edit
index.html - save the file
- preview it in the browser
- go back to VS Code and improve it
- repeat
This simple cycle is how a lot of web development begins.
Basic VS Code Habits That Save Time
- save files often
- keep the Explorer sidebar visible
- use indentation consistently
- open the whole folder, not just one file
- keep assets in folders like
assets/images - use search when you cannot find a file quickly
Common Beginner Mistakes
- saving the file as
.txtinstead of.html - opening the wrong folder in VS Code
- editing one file while previewing another
- forgetting to save before refreshing
- putting spaces and inconsistent names in files
- storing images in random locations
- expecting Live Server to work without opening the project folder
Troubleshooting Tips
The page opens as raw code instead of a webpage
Possible cause:
- the file was not saved as
.html
The browser shows an old version of the page
Possible causes:
- the file was not saved
- the browser was not refreshed
- Live Server was not running
Images do not appear
Possible causes:
- wrong file path
- image file is in a different folder
- file name capitalization does not match
Live Server does not start
Possible causes:
- the extension is not installed
- the project folder is not open
- the HTML file was not selected
Why This Chapter Matters
A strong setup saves time later. Once your workflow feels comfortable, the rest of HTML becomes much easier to learn because you can focus on markup instead of fighting the editor or browser.