Skip to main content

🛠️ Lesson 3: Setting Up Your Tools

Install Visual Studio Code, see the difference immediately, and set up a proper project folder for the rest of this course.

🎯 Learning Objectives

By the end of this lesson, you will be able to:

  • Download and install Visual Studio Code
  • Open a file and a folder in VS Code
  • Identify the key parts of the VS Code interface
  • Install the Live Server extension for live preview
  • Create a proper project folder structure for your website

Estimated Time: 45 minutes

Hands-on: You'll install VS Code, open your Notepad file in it, and set up your project folder.

📑 In This Lesson

Why Visual Studio Code?

Visual Studio Code (VS Code) is a free, open-source code editor made by Microsoft. It's the most popular code editor in the world, used by millions of developers for everything from simple HTML pages to massive applications.

Here's why we're using it:

  • Free — no license, no trial period, no hidden costs
  • Cross-platform — works on Windows, Mac, and Linux
  • Lightweight — installs fast, runs fast
  • Extensible — thousands of free extensions add extra features
  • Industry standard — learning VS Code is a transferable skill

💡 VS Code vs. Visual Studio

Don't confuse Visual Studio Code with Visual Studio. They're different products. Visual Studio (without "Code") is a much larger, heavier IDE mainly used for C# and .NET development. We want the lightweight one: Visual Studio Code.

Installing VS Code

Step 1: Download

  1. Go to code.visualstudio.com
  2. Click the big blue Download button — it will detect your operating system automatically
  3. The download should start within a few seconds

Step 2: Install

Windows:

  1. Run the downloaded .exe installer
  2. Accept the license agreement
  3. On the "Select Additional Tasks" screen, check these boxes:
    • Add "Open with Code" action to Windows Explorer file context menu
    • Add "Open with Code" action to Windows Explorer directory context menu
    • Add to PATH
  4. Click Install, then Finish

Mac:

  1. Open the downloaded .zip file
  2. Drag Visual Studio Code.app to your Applications folder
  3. Open it from Applications

Step 3: Launch

Open VS Code. You'll see a Welcome tab with some getting-started options. You can close that tab — we'll walk through everything you need.

The "Aha" Moment

Remember that my-page.html file you created on your Desktop in the last lesson? Let's open it in VS Code.

  1. In VS Code, go to File → Open File (or press Ctrl + O)
  2. Navigate to your Desktop and select my-page.html
  3. Click Open

Look at that. The exact same text you typed in Notepad — but now it has colors:

  • Tags like <h1> and <p> are one color
  • Attribute names like href are another color
  • Attribute values like "https://www.google.com" are yet another color
  • The actual text content is a different color from the tags

This is syntax highlighting, and it makes reading HTML infinitely easier. You can instantly see the structure of your document at a glance. No more squinting at a wall of black text.

💡 Same File. Different Experience.

Nothing about the file changed — it's the same text. The tool changed, and suddenly the code is readable.

Now try this: place your cursor after a < character and start typing a tag name like h2. See that dropdown menu that appears? That's auto-complete (also called IntelliSense in VS Code). It suggests tags as you type and can fill them in for you.

Quick Tour of VS Code

Let's get familiar with the interface. VS Code has five main areas:

graph TD A["VS Code Interface"] --> B["1. Activity Bar
(left edge — icons)"] A --> C["2. Sidebar
(file explorer, search)"] A --> D["3. Editor
(center — where you write code)"] A --> E["4. Terminal
(bottom panel — optional)"] A --> F["5. Status Bar
(bottom edge — info)"] style A fill:#eff6ff,stroke:#3b82f6,stroke-width:2px,color:#1e293b style B fill:#f8fafc,stroke:#64748b,stroke-width:1px,color:#1e293b style C fill:#f8fafc,stroke:#64748b,stroke-width:1px,color:#1e293b style D fill:#f0fdf4,stroke:#22c55e,stroke-width:2px,color:#1e293b style E fill:#f8fafc,stroke:#64748b,stroke-width:1px,color:#1e293b style F fill:#f8fafc,stroke:#64748b,stroke-width:1px,color:#1e293b
Area What It Does Key Shortcut
Activity Bar The vertical strip of icons on the far left. Switches between Explorer, Search, Extensions, etc.
Sidebar Shows your files and folders when Explorer is selected. Toggle it on/off. Ctrl + B
Editor The main area where you write and edit code. You can open multiple files in tabs.
Terminal A built-in command line (we won't need this much for HTML/CSS). Ctrl + `
Status Bar The thin bar at the very bottom. Shows file type, line number, encoding, etc.

Essential Keyboard Shortcuts

You don't need to memorize these now, but these will become second nature:

Shortcut What It Does
Ctrl + S Save the current file
Ctrl + N Create a new file
Ctrl + Z Undo
Ctrl + Shift + P Open the Command Palette (search any command)
Ctrl + / Toggle comment on/off for selected lines

✅ Pro Tip: Emmet

VS Code has a built-in tool called Emmet that lets you write HTML lightning-fast. For example, type h1 and press Tab — it expands to <h1></h1> with your cursor inside. Type ul>li*3 and press Tab — it creates a <ul> with three <li> items. You'll pick this up naturally as you use VS Code.

Installing Live Server

Remember the edit-save-refresh cycle from Lesson 2? Let's make it better. Live Server is a free VS Code extension that automatically refreshes your browser every time you save a file.

How to Install It

  1. In VS Code, click the Extensions icon in the Activity Bar (it looks like four small squares, or press Ctrl + Shift + X)
  2. In the search box, type Live Server
  3. Find the one by Ritwick Dey (it'll be the first result with millions of downloads)
  4. Click Install

How to Use It

  1. Open an HTML file in VS Code
  2. Right-click anywhere in the editor and choose "Open with Live Server"
  3. Your browser will open with the page — and it will auto-refresh whenever you save

No more manually refreshing. Edit, save, and watch the page update instantly. This small change makes development dramatically faster.

💡 What's Happening Behind the Scenes?

Live Server runs a tiny local web server on your computer. Instead of file:///... in the address bar, you'll see something like http://127.0.0.1:5500/. This is still your local machine — nothing is on the internet — but it more closely mimics how a real website works.

Setting Up Your Project Folder

It's time to get organized. Instead of saving random files to the Desktop, let's create a proper project folder.

Step 1: Create the Folder

  1. Open File Explorer (Windows) or Finder (Mac)
  2. Navigate to your Documents folder (or wherever you keep projects)
  3. Create a new folder called my-website

Step 2: Open It in VS Code

  1. In VS Code, go to File → Open Folder
  2. Select the my-website folder you just created
  3. Click Select Folder

Now look at the Sidebar — you should see your folder name at the top, with an empty explorer below it. This is your workspace. All of your website files will live here.

Step 3: Create Your First File

  1. In the Sidebar, hover over the folder name and click the New File icon (a page with a plus sign)
  2. Name it index.html
  3. Press Enter — the file opens in the editor, ready for you to write

💡 Why "index.html"?

The name index.html is special. When a web server receives a request for a folder (like www.example.com/), it automatically looks for a file called index.html and serves that. It's the default homepage. Every website project starts with an index.html.

What Your Project Should Look Like

Right now you have just one file:

my-website/
└── index.html

As the course progresses, you'll add more files and folders. By the end, your project will look something like this:

my-website/
├── index.html        (your homepage)
├── about.html        (about page)
├── contact.html      (contact page)
├── styles/
│   └── style.css     (your stylesheet)
└── images/
    ├── hero.jpg
    └── profile.jpg

But for now, one file is all you need. We'll build from here.

Bonus: Browser DevTools

One more tool worth knowing about — your browser has built-in developer tools (DevTools) that let you inspect any web page and see its HTML and CSS in real time.

How to Open DevTools

  • Chrome / Edge: Press F12 or Ctrl + Shift + I
  • Firefox: Press F12 or Ctrl + Shift + I
  • Any browser: Right-click any element on a page and choose "Inspect"

A panel will appear showing you the HTML and CSS behind whatever page you're looking at. This works on any website — you can inspect Google, YouTube, Wikipedia, anything.

We won't use DevTools heavily in this course, but it's an incredibly valuable learning tool. Whenever you see a design you like on a website, you can right-click it, choose Inspect, and see exactly how it was built.

✅ Try It Now

Right-click on this paragraph and choose "Inspect". You'll see the HTML that makes up this very page. Feel free to explore — you can't break anything. All changes you make in DevTools are temporary and disappear when you refresh.

Summary

🎉 Key Takeaways

  • VS Code is a free, powerful code editor with syntax highlighting, auto-complete, and Emmet shortcuts
  • The Live Server extension auto-refreshes your browser on save
  • A proper project folder keeps your files organized
  • index.html is the default homepage filename
  • Browser DevTools let you inspect any website's HTML and CSS

✅ Your Setup Checklist

Before moving on, make sure you have:

  • ✅ VS Code installed and working
  • ✅ Live Server extension installed
  • ✅ A my-website folder created and opened in VS Code
  • ✅ An empty index.html file inside that folder

🚀 What's Next?

Your tools are ready. Your project folder is set up. In the next lesson, you'll learn the proper structure of an HTML document — DOCTYPE, html, head, body, and all the pieces that make a page "correct" (not just something that happens to work). The HTML you typed in Notepad was functional, but it was missing a lot. Time to fix that.