This is Video 2 of ManoraTech's free 30-video web development course. You will install Visual Studio Code (VS Code) and Google Chrome, add the Live Server and Prettier extensions, turn on Auto Save and Format on Save, create your project folder and your first index.html, and open it with Live Server so the browser reloads by itself on every save. Then you will open Chrome DevTools and use the Elements and Console panels, the X-ray glasses every web developer uses.
What you will learn
- Install VS Code and Google Chrome (or another modern browser).
- Install and use the Live Server and Prettier extensions; turn on Auto Save and Format on Save.
- Create a project folder and a first index.html, and open it with Live Server.
- Open Chrome DevTools and find the Elements and Console panels.
Key takeaways
- VS Code is your editor, Chrome is your browser, and Live Server reloads the page every time you save.
- Prettier plus Format on Save keeps your code tidy automatically.
- Use lowercase file and folder names with dashes, never spaces. index.html is the main page of a website.
- DevTools lets you inspect and test any page, but changes there disappear on refresh, so always edit your files in VS Code.
What you will build
A setup check: a web-dev-course folder with an index.html page that says "Hello, world!", opened with Live Server so the browser reloads by itself every time you save.
This page only proves that your tools work. The real course website starts in Video 3, in a new folder called my-website.
What to install
| Tool | Where | Notes |
|---|---|---|
| Visual Studio Code | code.visualstudio.com | Free, for Windows, macOS and Linux |
| Google Chrome | google.com/chrome | Edge or Firefox are fine too. Their DevTools work almost the same |
| Live Server (by Ritwick Dey) | VS Code → Extensions (Ctrl + Shift + X) | Extension ID ritwickdey.LiveServer |
| Prettier - Code formatter | VS Code → Extensions | Extension ID esbenp.prettier-vscode |
Always download software from the official website.
Recommended settings
| Setting | Value | How to turn it on |
|---|---|---|
| Auto Save | afterDelay | File menu → Auto Save |
| Format On Save | on | Settings (Ctrl + ,) → search "format on save" → tick the box |
| Default Formatter | Prettier | Settings → search "default formatter" → choose Prettier - Code formatter |
| Tab Size | 2 | Settings → search "tab size" → 2 |
Or paste this into your user settings.json (Ctrl + Shift + P → Preferences: Open User Settings (JSON)). Keep any settings that are already there, and add a comma between entries.
{
"files.autoSave": "afterDelay",
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 2
}
Good to know: VS Code does not format a file during an auto save after delay. Prettier runs when you press Ctrl + S yourself (Mac: Cmd + S). Make it a habit: type, then press Ctrl + S.
Useful shortcuts
| Action | Windows / Linux | Mac |
|---|---|---|
| Save (and format) | Ctrl + S | Cmd + S |
| Open Settings | Ctrl + , | Cmd + , |
| Zoom in / out in VS Code | Ctrl + plus / Ctrl + minus | Cmd + plus / Cmd + minus |
| Open Chrome DevTools | F12 or Ctrl + Shift + I | Cmd + Option + I |
The code from this lesson
This is the code as it is at the end of the video. Copy it into VS Code and open the page with Live Server to see it in your browser.
index.html The "Hello, world!" setup check page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Setup Check</title>
</head>
<body>
<h1>Hello, world!</h1>
<p>My setup works. Live Server reloads this page every time I save.</p>
</body>
</html>
Practice challenge
Create a folder called practice, add a file named about.html with a heading that shows your name, and open it with Live Server. Change the text, save, and watch the browser update by itself.
Show the solution
The solution is in about.html below: the same short page as index.html, with the title "About Me" and an h1 that shows the name. Right-click it → Open with Live Server. If you created practice inside web-dev-course, the address ends in /practice/about.html, and that is fine. Change the heading text and save; the browser updates without pressing refresh.
about.html Solution
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>About Me</title>
</head>
<body>
<h1>Sara Ahmed</h1>
</body>
</html>
Quick quiz
Check what you learned. Pick an answer to see if it is right.
Question 1 of 3What does the Live Server extension do?
Show the answer
B. Serves your page locally and reloads it every time you save Live Server runs your page on your own computer (an address like 127.0.0.1:5500) and refreshes the browser on every save.
Question 2 of 3What should the main page of a website be called?
Show the answer
D. index.html Web servers look for index.html by default, so it becomes the home page.
Question 3 of 3Which key opens Chrome DevTools on Windows?
Show the answer
A. F12 F12 (or Ctrl + Shift + I) opens DevTools. On a Mac it is Cmd + Option + I.
Frequently asked questions
Which code editor is best for beginners?
Visual Studio Code (VS Code). It is free, made by Microsoft, runs on Windows, Mac and Linux, and is the most popular editor among web developers.
What does the Live Server extension do?
It runs your page on a small local server (the address 127.0.0.1:5500) and reloads the browser automatically every time you save.
What is Prettier?
A code formatter. It fixes spaces and indentation so your code stays clean and easy to read. Set it as the default formatter and turn on Format on Save.
How do I open Chrome DevTools?
Press F12, or Ctrl + Shift + I on Windows (Cmd + Option + I on a Mac), or right-click the page and choose Inspect.
Why not just double-click the HTML file?
It opens, but it never reloads by itself. Right-click the file in VS Code and choose Open with Live Server instead.
Do I have to use Chrome?
No. Microsoft Edge and Firefox work too, and their developer tools are very similar.
Read the full transcript
0:00 Welcome to ManoraTech
Hello, and welcome to ManoraTech! This is Web Development for Beginners, a free course in thirty short videos. This is video two: Set Up Your Coding Tools, VS Code and Chrome.
0:17 The two tools you need
Watch this. I change one word in my code, and the browser updates by itself. No refresh button, no waiting. That is the setup you will have by the end of this video. You need just two free tools, a code editor and a browser, plus two small extensions.
It works on Windows, Mac and Linux, and it is the same setup that professional web developers use every day. Let us set it up together, step by step.
0:44 Install VS Code and a browser
First, the code editor. A code editor is a program for writing code, like a word processor made especially for programmers. In this course we use Visual Studio Code, or VS Code for short. It is free, it is made by Microsoft, and it is the most popular editor among web developers.
Open your browser and go to code dot visualstudio dot com. The website detects your system, so just click the big download button. On Windows, run the installer and keep the default options. On a Mac, open the download and drag VS Code into your Applications folder.
On Linux, choose the package for your system. Always download from the official website, never from a random download site. Next, the browser. In this course I use Google Chrome, because its developer tools are excellent and very widely used. Microsoft Edge and Firefox are fine too, and their tools work in a very similar way.
If you want Chrome, search for Google Chrome and install it from Google's official page. Keep your browser up to date, so you always get the newest features. That is it: two free downloads.
1:59 A quick tour of VS Code
Open VS Code. If you see a Welcome tab, you can close it. On the far left is the Activity Bar, a column of icons. The top icon is the Explorer. It shows your files and folders in the Side Bar next to it. Below it you find Search, and further down, Extensions, which we use in a minute.
The big area in the middle is the editor, where you write your code. Every open file gets its own tab at the top of the editor. At the very bottom is the Status Bar. It shows helpful information, like the language of the file you are editing.
Two quick tips. Press Control and the plus key to make everything bigger, and Control and minus to make it smaller. And in the settings, you can choose a light or a dark colour theme. On a Mac, use Command instead of Control for every shortcut in this course.
Quick pause. If you are enjoying this video, please give it a like, share it with a friend who wants to learn web development, and subscribe to ManoraTech, so you never miss a lesson.
3:07 Must-have extensions: Live Server and Prettier
Extensions add new features to VS Code. Click the Extensions icon in the Activity Bar, the one made of four small squares. Search for Live Server, choose the one by Ritwick Dey, and click Install. Live Server runs your page on a small server on your own computer, and it reloads the browser every time you save a file.
Now search for Prettier and install the one called Prettier, Code formatter. Prettier tidies your code for you. It fixes spaces and indentation, so your code always stays easy to read. Next, two settings. Open the File menu and click Auto Save, so VS Code saves your work after a short pause.
Then press Control comma to open the Settings, search for format on save, and tick the box. While you are in the Settings, search for default formatter and choose Prettier from the list. One small detail: Prettier formats your file when you press Control S yourself, not during an auto save.
So make it a habit: type your code, then press Control S.
4:15 Create your project folder and first file
Make a new folder called web-dev-course, for example inside your Documents folder. Use lowercase letters and dashes in folder and file names, never spaces. In VS Code, choose File, then Open Folder, and select web-dev-course. If VS Code asks whether you trust the authors of these files, say yes.
It is your own folder. In the Explorer, click the New File icon and name the file index dot html. This name is special: it is the main page of a website, and web servers send it automatically when someone visits a folder. Type these lines exactly.
It is a tiny but complete web page, and the next video explains every line. Right-click index dot html and choose Open with Live Server. Your browser opens and shows Hello, world! The address starts with 127 dot 0 dot 0 dot 1, port 5500, which always means your own computer.
Change the heading, wait a second, and the browser updates by itself. Remember, this page is only a setup check. Your real website starts in the next video, in a new folder called my-website. Common mistake: double-clicking the HTML file. It opens, but it never reloads by itself.
If the address bar shows a file path, close that tab and use Open with Live Server.
5:45 Open DevTools: your X-ray glasses
Every modern browser has developer tools built in, called DevTools for short. I like to call them your X-ray glasses, because they let you see inside any web page. In Chrome on Windows, press F12. On some laptops, you also need to hold the Fn key.
You can also press Control Shift I, or right-click anything on the page and choose Inspect. On a Mac, press Command Option I. The first panel is Elements. It shows the HTML of the page, one element after another. Hover over a line, and the matching part of the page lights up.
Now double-click the words Hello, world in the Elements panel, type something new, and press Enter. The page changes instantly! But this change lives only in your browser. Refresh the page, and it is gone. To change your page for real, you always edit the file in VS Code.
Now click the Console tab. The Console shows messages from the page, and when something breaks, the error appears here in red. The Console can also run JavaScript. Type 2 plus 2 and press Enter. The answer, 4, appears right away. You will use the Console a lot when you learn JavaScript in module five.
From now on, keep DevTools close: you will open it in almost every video. If this lesson is helping you, a like, a share and a subscribe really help ManoraTech keep making free lessons like this one. Thank you! Now, let us keep going.
7:20 Practice challenge
Your turn. In the Explorer, click the New Folder icon and create a folder called practice. Inside it, add a file named about dot html with a heading that shows your name. You can copy the lines from your index dot html and change the heading and the title.
Open the file with Live Server. Then change the text, save, and watch the browser update by itself. If it does not update, check the address bar. And thanks to Auto Save, you do not even need to press Control S to see the change.
Pause the video now and try it. The solution is in the course files linked in the description.
8:02 Quick quiz
Quick quiz time! Three questions about this video. Answer out loud, or pause the video and write your answers in the comments. Question one. What does the Live Server extension do? A: Publishes your site on the internet. B: Serves your page locally and reloads it every time you save.
C: Fixes errors in your code automatically. D: Converts HTML into CSS. The answer is B. Live Server runs your page on your own computer, at a local address, and refreshes the browser on every save. Question two. What should the main page of a website be called?
A: Home dot txt. B: Main dot html. C: Page1.htm. D: Index dot html. The answer is D. Web servers look for index dot html by default, so it becomes the home page. Question three. Which key opens Chrome DevTools on Windows? A: F12. B: F5.
C: Ctrl plus S. D: Alt plus Tab. The answer is A. F12, or Control Shift I, opens DevTools. On a Mac it is Command Option I.
9:33 Outro and next video
Today you installed VS Code and a browser, added Live Server and Prettier, created your first page and opened DevTools. Your setup is ready. In the next video, Your First HTML Page, you will write a real web page from an empty file and understand every line.
If your setup works, give this video a like. Thank you for watching ManoraTech! If you learned something new today, like this video, share it with a friend, and subscribe. I will see you in the next video. Goodbye!