Getting Started with HTML
What You Need
Getting started with HTML is simple because you do not need a complex setup. A basic text editor and a modern web browser are enough to create and preview your first web page. This makes HTML one of the easiest technologies for beginners to start learning.
Setting Up VS Code
VS Code is a beginner-friendly code editor with syntax highlighting, extensions, and a fast editing workflow. It is not required, but it makes learning HTML smoother.
- Download VS Code from code.visualstudio.com
- Install the Live Server extension if you want automatic browser refresh while editing
- Create a new file and save it as
index.html - Type
!and press Tab to generate a ready-made HTML boilerplate in VS Code
Your First HTML File
This basic example shows the core structure of an HTML document. It includes the document type declaration, the root
html element, the head for metadata, and the body for visible page content. If
you understand this structure, you can build almost any page step by step.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My First Page</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>This is my first HTML page.</p>
<a href="https://www.tutorialslogic.com">Visit Tutorials Logic</a>
</body>
</html>
Understanding the Boilerplate
The generated HTML template may look long at first, but every part of it has a clear role. Learning what each line does helps you write HTML with confidence instead of copying blindly.
How to Run It
As you edit and save the file, refresh the browser to see your latest changes. If you use Live Server, that refresh can happen automatically.
Viewing Page Source & DevTools
Browsers include developer tools that help you inspect HTML, test small changes, and understand how pages are built. These tools are extremely helpful when you are learning.
# View page source (raw HTML)
Ctrl + U (Windows/Linux)
Cmd + U (Mac)
# Open DevTools (inspect elements, console, network)
F12
Ctrl + Shift + I (Windows/Linux)
Cmd + Option + I (Mac)
# Inspect a specific element
Right-click on any element and choose "Inspect"
Recommended Project Structure
Even a beginner project feels easier to manage when the files are organized. Keeping HTML, CSS, JavaScript, and images in separate folders makes your project cleaner and easier to expand later.
my-first-website/
|-- index.html
|-- about.html
|-- css/
| `-- style.css
|-- js/
| `-- script.js
`-- images/
`-- logo.png
HTML File Naming Rules
Beginner Workflow Tips
FAQ
Frequently Asked Questions
- HTML is easy to start because it only needs a text editor and a web browser.
- A basic HTML file contains the DOCTYPE declaration, html, head, and body elements.
- The charset and viewport meta tags are important for correct text rendering and responsive behavior.
- Using index.html as your homepage is a common web development convention.
- Developer tools help you inspect structure, test changes, and debug faster.
- A clean folder structure makes your HTML projects easier to maintain as they grow.