Getting Started with HTML: Setup, Edit, and Run Your Code in the Browser

Himmat Kumar Jul 25, 2024, 6:39 PM
HTML
Views 1950
Blog Thumbnail

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:

  1. Visit the VS Code Website: Go to Visual Studio Code.
  2. Download: Click the download button for your operating system (Windows, macOS, or Linux).
  3. Install: Open the downloaded file and follow the installation instructions.
VS Code Download

2. Setting Up Your HTML Editor

After installing VS Code, let's set it up for HTML development.

Steps to Set Up:

  1. Open VS Code: Launch the application.
  2. 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".
  3. Create a New File: Click File > New File or press Ctrl+N.
  4. Save the File: Save the file with a .html
  5. Save the File: Save the file with a .html extension by clicking File > Save As and naming it index.html.
VS Code Setup

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>
            
        
  1. Paste the Code: Copy the code above and paste it into your index.html file in VS Code.
  2. Save the File: Save your changes by clicking File > Save or pressing Ctrl+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:

  1. Open the File in a Browser: Locate your index.html file in your file explorer, right-click it, and select Open with > Your Preferred Browser (e.g., Chrome, Firefox).
  2. View Your Page: The browser will display your HTML page with the "Hello, World!" message.
HTML in Browser

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!

Comments

Please login to leave a comment.

No comments yet.

Related Posts

2884 viewsHTML
Himmat Regar Jun 2, 2025, 6:54 PM

HTML Tables for Data — Not Layout! Semantics, Accessibi...

3780 viewsHTML
Himmat Kumar Apr 8, 2025, 2:34 PM

HTML <br> and <hr> Tags Explained with Examples and Bes...

3012 viewsHTML
Himmat Kumar Apr 10, 2025, 11:19 AM

Comments in HTML – Guide with Examples

1768 viewsHTML
Himmat Kumar Oct 13, 2023, 11:40 PM

What is HTML? Full Explanation and Guide

2693 viewsHTML
Himmat Regar Jun 2, 2025, 6:38 PM

HTML Lists & Links Guide – Correct Markup, Accessibilit...

3653 viewsHTML
Himmat Regar Jun 23, 2025, 4:23 PM

Mastering Responsive Meta & SEO-Friendly Markup in 2025

3254 viewsHTML
Himmat Regar Jun 23, 2025, 4:41 PM

HTML & SEO FAQ 2025: Answers to the Web’s Most-Asked Qu...

3271 viewsHTML
Himmat Regar Jun 23, 2025, 4:37 PM

Hyperlinks & Media: Embedding Content the Right Way in ...

2464 viewsHTML
Himmat Kumar Apr 10, 2025, 11:37 AM

Bold, Italic, Underline in HTML – Examples & Syntax

4205 viewsHTML
Himmat Regar Jun 9, 2025, 5:37 PM

Semantic HTML Explained: Why <header>-<footer> & Friend...