HTML Basics for Beginners Your First Webpage (HTML Tutorial #1)

HTML Basics for Beginners: Your First Webpage (HTML Tutorial #1)

Hey there, future web developer! πŸ‘‹

Remember when you were a kid and built stuff with Lego blocks? Well, learning HTML is kinda like that β€” except instead of building a castle or spaceship, you’re building a website. And the best part? You don’t need any fancy tools or expensive software. Just you, a text editor, and a browser. That’s it!

If you’ve never written a single line of code before, don’t worry. This tutorial is for you. By the end, you’ll have built your very first webpage. No kidding!

This guide is part of our HTML Basics for Beginners series β€” a free course that teaches you web development from scratch.

What You’ll Learn Today

By the end of this tutorial, you’ll know how to:

βœ… Create your first HTML file (the famous “Hello, World!”)
βœ… Understand what all those weird <tags> mean
βœ… Write headings and paragraphs (the building blocks of every website)
βœ… Build a mini project: an “About Me” webpage

Sound good? Let’s dive in! πŸš€

Why Should You Learn HTML?

Great question! Here’s the deal:

HTML is the skeleton of the internet. Every single website you’ve ever visited β€” Google, YouTube, Instagram, your favorite online store β€” they all start with HTML. It’s like the foundation of a house. Without it, you can’t build anything else.

Plus:

  • It’s super easy to learn (seriously, if you can type, you can code HTML)
  • You see results immediately (no waiting, no compiling β€” just open your file and BAM, there’s your webpage)
  • It’s the first step to becoming a web developer (after HTML, you learn CSS to make things pretty, then JavaScript to make things interactive)

Still not convinced? Here’s a fun fact: the first webpage ever created was made in 1991, and it was just pure HTML. No fancy styling, no animations β€” just text and links. And guess what? That webpage is still online today! 🀯

Okay, enough talk. Let’s build something!

Step 1: What Do You Need?

Here’s the good news: you already have everything you need.

To write HTML, you need:

  1. A text editor β€” This is where you write your code
    β†’ Windows: Notepad (it’s already installed!)
    β†’ Mac: TextEdit (also already installed!)
    β†’ Want something fancier? Try VS Code (free and awesome)
  2. A web browser β€” This is where you see your webpage
    β†’ Chrome, Firefox, Safari, Edge β€” any browser works

That’s literally it. No account sign-ups, no credit card, no complicated installations. Just grab a text editor and let’s go!

Step 2: Your First HTML File

Alright, here’s where the magic begins. 🎩✨

Let’s create your very first HTML file.

What to do:

  1. Open your text editor (Notepad, VS Code, whatever you picked)
  2. Copy and paste this code:
  1. Save the file as index.html (make sure it ends with .html, not .txt)
  2. Double-click the file β€” your browser will open it

YOU JUST BUILT A WEBPAGE. πŸŽ‰

I know it doesn’t look fancy yet, but seriously β€” you just created a real, working webpage. That’s awesome!

πŸ’‘ Pro Tip: Create a folder called html-projects to keep all your practice files organized.

Try It Live! πŸš€

See the Pen Codeboid – HTML Tutorial #1 β€” First Webpage by Codeboid (@Codeboid) on CodePen.

Step 3: Wait, What Do All Those Tags Mean?

Okay, let’s break down what you just wrote. Don’t worry, it’s simpler than it looks.

Translation: “Hey browser, this is an HTML5 document. Please read it correctly!”
You put this at the very top of every HTML file. It’s like saying “This is an English essay” before handing in your homework.

Translation: “Everything inside this tag is HTML code.”

The tag wraps your entire webpage.
It tells the browser where your HTML content starts and ends.

Translation: “Here’s some important info about my webpage.”
The <head> section contains invisible stuff β€” like the page title (what shows up in the browser tab). Users don’t see what’s in here, but it’s important for browsers and search engines.

Translation: This makes sure your webpage can display all characters correctly (including emojis 😊).

Translation: This helps your website look good on phones and tablets.

Translation: β€œThis is the name of my webpage.”

The <title> tag sets the text you see:

  • On the browser tab
  • In bookmarks
  • In search engine results (like Google)

Even though users don’t see it inside the page, it’s very important.
Every webpage should have a clear, meaningful title.

Translation: “Here’s all the stuff that shows up on the webpage.”
The <body> is where all your visible content goes β€” text, images, videos, everything!

The Sandwich Analogy πŸ₯ͺ

Think of HTML tags like bread slices:

  • <h1> is the top slice
  • Your text (“Hello, World!”) is the filling
  • </h1> is the bottom slice

Together, they make a complete sandwich… I mean, element!

Most HTML tags come in pairs: an opening tag <h1> and a closing tag </h1>. Notice the closing tag has a forward slash /.

Step 4: Let’s Add Some Headings

Headings are like the titles and subtitles of your webpage. HTML gives you six levels of headings: <h1> through <h6>.

What you’ll see:
Each heading gets progressively smaller. <h1> is the biggest (use it for your main title), and <h6> is the smallest.

When to Use Each Heading:

  • <h1> β†’ Main title of your page (only use ONE per page)
  • <h2> β†’ Major sections
  • <h3> β†’ Sub-sections
  • <h4> to <h6> β†’ Smaller sub-sections (honestly, you won’t use these much)

Think of it like a book:

  • <h1> = Book Title
  • <h2> = Chapter Name
  • <h3> = Section in the Chapter

Try It Live! πŸš€

See the Pen Codeboid – HTML Tutorial #1 β€” Headings by Codeboid (@Codeboid) on CodePen.

Step 5: Writing Paragraphs

Great, so you’ve got headings. Now let’s add some actual text with paragraphs.

The paragraph tag is <p>. It’s super simple:

Cool Thing About Paragraphs:

In HTML, you can press Enter a hundred times in your code, and the browser will ignore it. Watch:

Result: “This is a paragraph. Even though I pressed Enter a bunch of times, the browser shows this as one continuous line.”

The browser only creates a new paragraph when you use <p> tags. Pretty smart, right?

Try It Live! πŸš€

See the Pen Codeboid – HTML Tutorial #1 β€” Paragraphs by Codeboid (@Codeboid) on CodePen.

Step 6: Mini Project β€” Your “About Me” Page

Okay, time to put everything together! Let’s build something fun: an About Me webpage.

This is where you introduce yourself to the world. Think of it as your digital business card.

Here’s the code:

Try It Live! πŸš€

See the Pen Codeboid – HTML Tutorial #1 β€” About Me Project by Codeboid (@Codeboid) on CodePen.

Your Turn! 🎯

Customize this page:

  1. Change “Alex” to your name
  2. Rewrite the paragraphs with YOUR hobbies, interests, and story
  3. Add more sections β€” like “My Favorite Movies” or “My Goals”
  4. Save it as about.html and open it in your browser

Boom. You just built a real webpage. How cool is that?

Step 7: Let’s Make It Even Better

Right now, your page is plain text. In the next tutorials, we’ll add:

  • Lists (bullet points, numbered lists)
  • Links (so you can click to other pages)
  • Images (because websites without pictures are boring)
  • Colors and styling (with CSS)

But for now, you’ve learned the foundation. You know how to create HTML files, write headings and paragraphs, and build a basic webpage. That’s HUGE!

Quick Recap: What You Learned Today

Let’s review what you just learned in this HTML basics for beginners tutorial:

βœ… How to create an HTML file (save it as .html)
βœ… The basic structure of a webpage (<!DOCTYPE html>, <html>, <head>, <body>)
βœ… How to write headings (<h1> through <h6>)
βœ… How to write paragraphs (<p>)
βœ… How to build a simple “About Me” webpage

That’s a solid start! πŸŽ‰

Practice Challenge

Don’t just read this tutorial β€” actually do it. Here’s your homework:

  1. Create a new HTML file called myfirstpage.html
  2. Write an “About Me” page with:
    • One <h1> heading (your name)
    • Three <h2> headings (like “Hobbies,” “Goals,” “Fun Facts”)
    • At least four paragraphs
  3. Open it in your browser and admire your work!

The more you practice, the better you’ll get. Trust me!

What’s Next?

After that? We’ll dive into links and images to make your pages interactive and visual.

FAQ for HTML Beginners

Do I need to memorize all these tags?

Nope! You’ll naturally remember the ones you use most (<h1>, <p>, <a>, <img>). For everything else, just Google it or use a reference guide.

What if I make a mistake?

That’s totally fine! If your page doesn’t look right, check for typos, missing closing tags, or wrong tag names. Browsers are forgiving β€” most mistakes won’t break anything.

Can I build a real website with just HTML?

Yes, but it’ll look plain. HTML is for structure. To make it look professional, you’ll need CSS for styling and JavaScript for interactivity (we’ll cover those later).

How long does it take to learn HTML?

With daily practice, you can learn the basics in 1-2 weeks. To get really comfortable? Maybe a month or two. The good news? You’ll see progress immediately!

Stay tuned, and keep practicing! 🌱

Get the Source Code

Final Thoughts

Learning to code can feel overwhelming at first. But here’s the secret: everyone starts exactly where you are right now. Even the best developers in the world once wrote their first “Hello, World!” and felt proud.

You’re doing great. Keep going. Build something every day β€” even if it’s tiny.

And remember: HTML is not hard. You’ve got this. πŸ’ͺ

See you in the next tutorial! 🌱

Scroll to Top