Building a Personal Website with HTML, CSS, and JavaScript πŸš€πŸŒ

Taylor Emma
5 Min Read
Disclosure: This website may contain affiliate links, which means I may earn a commission if you click on the link and make a purchase. I only recommend products or services that I personally use and believe will add value to my readers. Your support is appreciated!

Having your own personal website is a great way to showcase your skills, projects, or even start a blog! Whether you’re a developer, designer, freelancer, or job seeker, a website makes you stand out.

The best part? You don’t need any fancy toolsβ€”just HTML, CSS, and JavaScript! πŸ› οΈ

In this guide, we’ll walk you through building a simple yet stylish personal website step by step. Let’s get started! πŸš€

Β 

πŸ“Œ What You’ll Learn:

βœ… HTML – The structure of your website πŸ—οΈ

βœ… CSS – The design & styling 🎨

βœ… JavaScript – Adding interactivity ✨

βœ… Deploying – Making your site live 🌎

By the end, you’ll have a fully functional personal website like this:

πŸ’» YourName.com (Your own online portfolio!)

Β 

1️⃣ Setting Up Your Project πŸ—οΈ

πŸ”Ή Create a Project Folder

First, create a folder for your website:

python
------
personal-website/
  β”œβ”€β”€ index.html
  β”œβ”€β”€ style.css
  β”œβ”€β”€ script.js
  β”œβ”€β”€ images/
  β”œβ”€β”€ projects.html (Optional)

πŸ”Ή Open Your Code Editor

Use VS Code, Sublime Text, or Notepad++ to write your code.

Now, let’s start coding! πŸš€

Β 

2️⃣ Writing the HTML (Structure) πŸ—οΈ

Create index.html and add this code:

html
------
<!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>
    <link rel="stylesheet" href="style.css">
</head>
<body>

    <header>
        <h1>Hi, I'm John Doe πŸ‘‹</h1>
        <p>Web Developer | Tech Enthusiast | Blogger</p>
        <a href="#contact" class="btn">Contact Me</a>
    </header>

    <section id="about">
        <h2>About Me</h2>
        <p>I'm a passionate web developer who loves building beautiful websites and apps.</p>
    </section>

    <section id="projects">
        <h2>Projects</h2>
        <ul>
            <li>🌟 <a href="#">Portfolio Website</a></li>
            <li>πŸš€ <a href="#">Weather App</a></li>
            <li>πŸ“± <a href="#">To-Do List App</a></li>
        </ul>
    </section>

    <section id="contact">
        <h2>Contact Me</h2>
        <form>
            <input type="text" placeholder="Your Name" required>
            <input type="email" placeholder="Your Email" required>
            <textarea placeholder="Your Message" required></textarea>
            <button type="submit">Send Message</button>
        </form>
    </section>

    <script src="script.js"></script>
</body>
</html>

βœ”οΈ This creates sections for About, Projects, and Contact.

βœ”οΈ We added a form for users to contact you.

3️⃣ Styling with CSS 🎨

Now, let’s make it look good! Create style.css and add:

css
------
/* General Styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
}

/* Header Section */
header {
    background: #007BFF;
    color: white;
    padding: 50px;
}

.btn {
    background: white;
    color: #007BFF;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

/* Sections */
section {
    padding: 50px;
}

h2 {
    color: #007BFF;
}

/* Contact Form */
form {
    display: flex;
    flex-direction: column;
    max-width: 400px;
    margin: auto;
}

input, textarea {
    margin: 10px 0;
    padding: 10px;
    width: 100%;
}

button {
    background: #007BFF;
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
}

βœ”οΈ The header is blue and attractive.

βœ”οΈ Buttons, text, and sections are clean and simple.

βœ”οΈ The form is neatly styled.

πŸ”Ή Save & Refresh your browser. Now, your site looks great! πŸš€

Β 

4️⃣ Adding Interactivity with JavaScript ✨

Let’s make the contact form interactive! Create script.js and add:

js
------
document.querySelector("form").addEventListener("submit", function(event) {
    event.preventDefault();
    alert("Thanks for your message! I'll get back to you soon. 😊");
});

βœ”οΈ Now, when someone submits the form, an alert pops up!

πŸ”Ή Try It Out! Type something in the form and hit β€œSend Message”!

Β 

5️⃣ Making Your Website Live 🌍

πŸ”Ή Option 1: GitHub Pages (Free & Easy!)

1️⃣ Create a GitHub account (if you don’t have one).

2️⃣ Create a new repository (e.g., my-website).

3️⃣ Upload your project files (index.html, style.css, script.js).

4️⃣ Go to Settings β†’ Pages β†’ Select β€œmain” branch β†’ Save.

5️⃣ Your site is live at:

perl
------
https://yourusername.github.io/my-website/

πŸŽ‰ Congratulations! Your website is online! πŸš€

Β 

πŸ”₯ Bonus Features to Add Later

βœ… Dark Mode – Toggle light/dark themes.

βœ… Animations – Use CSS animations for a dynamic UI.

βœ… Blog Section – Add articles and posts.

βœ… More JavaScript Features – Interactive buttons, API integrations, etc.

πŸ”š Conclusion: You Built a Website! πŸŽ‰

You just created your first personal website using HTML, CSS, and JavaScript! πŸš€

βœ”οΈ HTML – Structured the website.

βœ”οΈ CSS – Styled it beautifully.

βœ”οΈ JavaScript – Made it interactive.

βœ”οΈ Deployment – Put it online with GitHub Pages!

πŸ’‘ What’s next? Customize your site, add projects, and share it on LinkedIn!

Share This Article
A senior editor for The Mars that left the company to join the team of SenseCentral as a news editor and content creator. An artist by nature who enjoys video games, guitars, action figures, cooking, painting, drawing and good music.