HTML, CSS & JavaScript 7 min read

Chocolate Day 🍫

Create a sweet Chocolate Day page with "Happy Chocolate Day" hero, chocolate rain effect, an unwrap-able chocolate letter, send-a-love-note card, fun chocolate facts, gallery, and chocolate quotes. Includes dark mode toggle. Perfect for Valentine's week day 3 or any sweet occasion!

This Chocolate Day project is a single-page website with a hero section ("Happy Chocolate Day"), falling chocolate rain animation, clickable chocolate pieces with sweet messages, floating hearts, and a letter section that unwraps like a chocolate bar when you scroll or tap. It also includes a "Send a Chocolate Love Note" card, fun facts about chocolate, a simple gallery, and rotating chocolate quotes. Dark mode is supported via a toggle.

The project uses plain HTML, CSS (with variables, gradients, and animations), and JavaScript for chocolate rain, unwrap progress, love note, random quotes, and theme toggle. All files sit in one folder: chocolate day/.

📦 Get the Complete Project

Scroll down for the full HTML, CSS, and JavaScript code. Keep the same folder structure so paths work.

⬇️ Full code and assets structure below

📄 Complete HTML Code

Copy this into index.html for the main Chocolate Day page.

index.html
Loading code...

🎨 Complete CSS Code

Copy this into styles.css. It styles the hero, letter, love card, facts, gallery, and dark mode.

styles.css
Loading code...

⚡ Complete JavaScript Code

Copy this into script.js. Handles chocolate rain, unwrap progress, love note, quotes, and dark mode.

script.js
Loading code...

📁 Project Assets

Keep the assets in this structure so all paths work:

pages/
├── assets/
│   └── chocolate day/
│       ├── index.html
│       ├── styles.css
│       └── script.js
  • All files in one folder: chocolate day/
  • Edit the letter text and love note in index.html
  • Edit chocolate quotes in the chocolateQuotes array in script.js

📦 Get Project on GitHub

Download the full project source from our GitHub repository.

⬇️ View GitHub

Key Features

  • 🍫 Happy Chocolate Day hero with chocolate-style title
  • 🌧️ Falling chocolate rain animation
  • 💝 Unwrap-able chocolate bar letter (scroll or tap)
  • 💌 Send a Chocolate Love Note card
  • 📜 Fun chocolate facts section
  • 🖼️ Simple gallery and rotating chocolate quotes
  • 🌙 Dark mode toggle
  • 📱 Responsive, mobile-friendly layout

Customization Tips

  • Letter: Edit the letter greeting and body in index.html (letter section)
  • Quotes: Edit the chocolateQuotes array in script.js
  • Colors: Change CSS variables in styles.css for theme colors
  • Name: Update letter-name and any "Someone who adores you" text in HTML

📢 Thanks for your support

English: We keep our projects free thanks to supporters like you. View the content below if you'd like, then press OK to continue to the download.

हिंदी: आप जैसे सपोर्टर्स की वजह से हम ये प्रोजेक्ट मुफ्त रख पाते हैं। नीचे का कंटेंट देख सकते हैं, फिर डाउनलोड के लिए OK दबाएं।

📢 Loading Demo

English: Please wait while we load the demo. You'll be redirected automatically in a few seconds.

हिंदी: कृपया प्रतीक्षा करें, हम डेमो लोड कर रहे हैं। आप कुछ सेकंड में स्वचालित रूप से रीडायरेक्ट हो जाएंगे।