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!
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).
After installing VS Code, let's set it up for HTML development.
Ctrl+Shift+X
. Search for "HTML" and install a recommended extension like "HTML Snippets".File
> New File
or press Ctrl+N
..html
.html
extension by clicking File
> Save As
and naming it index.html
.Now, let's write some basic 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>
index.html
file in VS Code.File
> Save
or pressing Ctrl+S
.Finally, let's run the HTML code in your browser to see it in action.
index.html
file in your file explorer, right-click it, and select Open with
> Your Preferred Browser
(e.g., Chrome, Firefox).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!