- Download VS Code: Go to the Visual Studio Code website and download the installer for your operating system.
- Install VS Code: Run the installer and follow the setup instructions. Ensure you check the options to add VS Code to the context menu and the PATH during installation.
- Open VS Code: Launch Visual Studio Code.
- Install Live Server:
- Go to the Extensions view by clicking the Extensions icon in the sidebar or pressing
Ctrl+Shift+X. - Search for "Live Server" and click the "Install" button.
- Go to the Extensions view by clicking the Extensions icon in the sidebar or pressing
-
Create a New File:
- Open a new folder in VS Code where you want to save your project.
- Create a new file and name it
index.html.
-
Write Your HTML Code:
- Open
index.htmland type the following code:
- Open
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hello World</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>