Hello future web developer! Before we start our exciting journey together, let's understand what we're going to create and learn. By the end of this guide, you'll have your very own website that looks professional and works great!
Think of this website as your digital home. Just like a real house has different rooms, your website will have different sections:
First, we need to create a special place on your computer for your website files. Think of this like creating a new folder for an important school project.
For Windows Users:
For Mac Users:
Great! Now you have a home for your website files! 🏠
Now we need a special program to write our code. Think of this like getting a really smart notebook that helps you write correctly.
We'll use Visual Studio Code (VS Code) because it's:
Let's get VS Code:
Now comes the exciting part - creating your first webpage file!
Congratulations! You've created your first HTML file! 🎉
Let's start with the basic structure of every webpage. We'll add this piece by piece so it's easier to understand.
First, type these lines:
<!DOCTYPE html>
<html lang="en">
What do these lines mean?
<!DOCTYPE html>
is like telling your browser "Hey, this is a webpage!"<html lang="en">
starts your webpage and tells browsers it's in EnglishNow add:
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Personal Website</title>
</head>
Let's understand each line:
<head>
is like the brain of your webpage - it contains important information<meta charset="UTF-8">
helps your webpage show special characters correctly<meta name="viewport" content="width=device-width, initial-scale=1.0">
makes your website look good on phones and tablets<title>
is what people see at the top of their browser windowFinally, add:
<body>
</body>
</html>
What are these for?
<body>
is where all the visible content goes (like text and images)</html>
closes your webpage (like closing a book)Now your complete basic structure looks like this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Personal Website</title>
</head>
<body>
</body>
</html>
Let's make sure everything is working:
Don't worry if the page is blank - that's perfect! It means everything is working, and we're ready to add content.
Inside your <body>
tags, let's add a welcoming header. We'll do this in small steps:
First, add this:
<header>
<h1>Your Name</h1>
</header>
What does this do?
<header>
creates a special section at the top of your page<h1>
makes the biggest heading (like a title)Now change "Your Name" to your actual name!
Under your name, let's add what you do. Inside the <header>
tags, add:
<header>
<h1>Your Name</h1>
<h2>Web Developer in Training</h2>
</header>
Understanding this:
<h2>
is a smaller heading than <h1>
Let's add a section where you can tell visitors about yourself. Under your </header>
tag, add:
<section>
<h2>About Me</h2>
</section>
Why are we doing this?
<section>
is like creating a new chapter in your website<h2>
shows visitors what this section is aboutInside your <section>
tags, after the <h2>
, add:
<section>
<h2>About Me</h2>
<p>Hi there! I'm excited to share my journey into web development.</p>
</section>
Understanding this new part:
<p>
stands for paragraph<p>
tags like paragraphs in a bookLet's add more about you. Add these paragraphs:
<section>
<h2>About Me</h2>
<p>Hi there! I'm excited to share my journey into web development.</p>
<p>I'm learning how to build websites and loving every minute of it!</p>
<p>When I'm not coding, I enjoy [write your hobbies here].</p>
</section>
Customizing Your About Section:
After your About Me section, let's show what you're learning. Add:
<section>
<h2>My Skills</h2>
</section>
Inside this section, let's add a list of your skills:
<section>
<h2>My Skills</h2>
<ul>
<li>HTML Basics</li>
<li>Learning Web Development</li>
<li>Problem Solving</li>
</ul>
</section>
What's happening here?
<ul>
creates an "unordered list" (with bullet points)<li>
is for each "list item"<li>
tagYou can add more skills! Here's how:
<section>
<h2>My Skills</h2>
<ul>
<li>HTML Basics</li>
<li>Learning Web Development</li>
<li>Problem Solving</li>
<li>Creative Thinking</li>
<li>Eager to Learn More!</li>
</ul>
</section>
Tips for Your Skills List:
At the bottom of your webpage (before the closing </body>
tag), add:
<footer>
<h2>Get In Touch</h2>
</footer>
Why use <footer>
?
<footer>
is a special tag for the bottom of your webpageInside your <footer>
, let's add ways for people to reach you:
<footer>
<h2>Get In Touch</h2>
<p>Email: <a href="mailto:your.email@example.com">your.email@example.com</a></p>
</footer>
Understanding the new parts:
<a>
creates a linkhref="mailto:"
makes it open an email programIf you want, add links to your social profiles:
<footer>
<h2>Get In Touch</h2>
<p>Email: <a href="mailto:your.email@example.com">your.email@example.com</a></p>
<p>GitHub: <a href="https://github.com/yourusername">My GitHub Profile</a></p>
</footer>
Now that we've built everything piece by piece, here's how your complete website should look:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Personal Website</title>
</head>
<body>
<!-- Header Section -->
<header>
<h1>Your Name</h1>
<h2>Web Developer in Training</h2>
</header>
<!-- About Me Section -->
<section>
<h2>About Me</h2>
<p>Hi there! I'm excited to share my journey into web development.</p>
<p>I'm learning how to build websites and loving every minute of it!</p>
<p>When I'm not coding, I enjoy [your hobbies here].</p>
</section>
<!-- Skills Section -->
<section>
<h2>My Skills</h2>
<ul>
<li>HTML Basics</li>
<li>Learning Web Development</li>
<li>Problem Solving</li>
<li>Creative Thinking</li>
<li>Eager to Learn More!</li>
</ul>
</section>
<!-- Contact Section -->
<footer>
<h2>Get In Touch</h2>
<p>Email: <a href="mailto:your.email@example.com">your.email@example.com</a></p>
<p>GitHub: <a href="https://github.com/yourusername">My GitHub Profile</a></p>
</footer>
</body>
</html>
Save your file (Ctrl+S or Cmd+S)
Open it in your web browser
Check that:
If something doesn't look right:
<>
symbols are typed correctlyCongratulations! You've just:
To keep improving:
Remember: Every professional web developer started exactly where you are now. Be proud of what you've built, and keep practicing! You're doing great! 💪
Try these changes to practice:
Keep building and learning - you're now officially on your way to becoming a web developer! 🌟