Getting Started with HTML: Setup, Edit, and Run Your Code in the Browser
Welcome to our beginner-friendly guide on how to start writing HTML! Whether you're new to web development or just need a refresher, this post will walk you through downloading an HTML editor, setting it up, writing your first lines of code, and running it in your browser. Let's dive in!
1. Downloading an HTML Editor
Before we start writing HTML, we need an editor. There are many free editors available, but for this guide, we'll use Visual Studio Code (VS Code).
Steps to Download VS Code:
- Visit the VS Code Website: Go to Visual Studio Code.
- Download: Click the download button for your operating system (Windows, macOS, or Linux).
- Install: Open the downloaded file and follow the installation instructions.

2. Setting Up Your HTML Editor
After installing VS Code, let's set it up for HTML development.
Steps to Set Up:
- Open VS Code: Launch the application.
- Install HTML Extension: Go to the Extensions view by clicking the Extensions icon in the Activity Bar on the side of the window or by pressing
Ctrl+Shift+X
. Search for "HTML" and install a recommended extension like "HTML Snippets". - Create a New File: Click
File
>New File
or pressCtrl+N
. - Save the File: Save the file with a
.html
- Save the File: Save the file with a
.html
extension by clickingFile
>Save As
and naming itindex.html
.

3. Writing Your First HTML Code
Now, let's write some basic HTML code.
Example HTML Code:
<!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, World!</h1>
<p>This is my first HTML page.</p>
</body>
</html>
- Paste the Code: Copy the code above and paste it into your
index.html
file in VS Code. - Save the File: Save your changes by clicking
File
>Save
or pressingCtrl+S
.
4. Running Your HTML Code in the Browser
Finally, let's run the HTML code in your browser to see it in action.
Steps to Run the Code:
- Open the File in a Browser: Locate your
index.html
file in your file explorer, right-click it, and selectOpen with
>Your Preferred Browser
(e.g., Chrome, Firefox). - View Your Page: The browser will display your HTML page with the "Hello, World!" message.

Conclusion
Congratulations! You've successfully set up an HTML editor, written your first HTML code, and run it in your browser. Keep experimenting with different HTML elements and build your web development skills. Stay tuned for more tutorials and happy coding!