DEV Community

Rohan Harne
Rohan Harne

Posted on

πŸŽ‰ Creating a Birthday Wisher with HTML & CSS β€” Make Someone's Day Special!

🌟 Introduction
Ever thought of wishing someone Happy Birthday in a creative and unforgettable way? How about sending them a customized web page with their name, a photo, and a heartfelt message β€” all built by you?

In this blog, I’ll walk you through building a simple yet elegant Birthday Wisher website using HTML, CSS, and JavaScript, with multiple pages, image upload, and direct shareable link support. A perfect mini-project to showcase your frontend skills and make someone feel special!

πŸ“ Project Structure
bash
Copy
Edit
birthday-wisher/
β”œβ”€β”€ index.html # Home Page
β”œβ”€β”€ upload.html # Upload birthday image
β”œβ”€β”€ wish.html # Personalized birthday wish
β”œβ”€β”€ style.css # Shared styles
β”œβ”€β”€ assets/ # Images & uploaded files
└── README.md # Project info
πŸ”§ Features at a Glance
βœ… Multi-page website
βœ… Image upload & preview
βœ… Birthday message display
βœ… Direct sharable link (yourname.github.io/birthday-wisher/wish.html)
βœ… Fully responsive & colorful interface

πŸ’» Key HTML Pages
🏠 index.html – Home Page
html
Copy
Edit

πŸŽ‰ Make Someone's Day Special!


Celebrate birthdays with personalized wishes and joyful memories.

πŸ“€ upload.html – Upload Image Page
html
Copy
Edit

function previewImage(e) {
const preview = document.getElementById('preview');
preview.src = URL.createObjectURL(e.target.files[0]);
preview.style.display = 'block';
}

πŸ’Œ wish.html – Birthday Message Page
html
Copy
Edit

πŸŽ‚ Happy Birthday, [Name]!

Wishing you love, laughter, and happiness on your special day!

Uploaded Image
🎨 Styling with style.css

css
Copy
Edit
body {
background-color: #fff0f5;
font-family: 'Segoe UI', sans-serif;
text-align: center;
}
nav {
background-color: #ff69b4;
padding: 15px;
}
nav a {
color: white;
text-decoration: none;
margin: 0 15px;
}
.hero {
padding: 50px;
background: linear-gradient(#ffe4e1, #fff0f5);
}
πŸ”— Making the Link Shareable
Once you host it on GitHub Pages, you can share your wish.html page as a unique link like:

arduino
Copy
Edit
https://yourusername.github.io/birthday-wisher/wish.html
That link is clickable, no login required, and works on any device.

πŸ’‘ Unique & Commonly Used Code Snippets
πŸ“Έ JavaScript Image Preview
js
Copy
Edit
function previewImage(event) {
const output = document.getElementById('preview');
output.src = URL.createObjectURL(event.target.files[0]);
output.style.display = 'block';
}
πŸ”— Navbar Code (Used on all pages)
html
Copy
Edit

Home
Upload
Wish

πŸ’¬ Final Thoughts
This simple yet meaningful project brings together HTML, CSS, and JavaScript to create a gift that’s digital, personalized, and shareable. It’s perfect for beginners, portfolio builders, or just spreading smiles!

"Code a wish. Share a smile. Celebrate life β€” the dev way!" πŸ₯³

GitHub Repository: github.com/rohanharne45/birthday-wisher

rohanharne45.github.io/birthday-wisher

Top comments (0)