Build a Countdown Timer to Any Date With a Confetti Finish in One HTML File

Get a polished single-file countdown page with a custom event title, a large days-hours-minutes-seconds display and a confetti-and-chime celebration at zero.

You getone complete HTML file in a single code block, then 3 short ideas to extend it.

The prompt

Prompt
Act as a senior front-end developer and product designer who builds small, polished web tools.

Build Moment Mark, a single-page countdown timer to a chosen date and time. The user types an event title, picks a date and time, and sees a large days, hours, minutes and seconds display that updates live. When it reaches zero, the page celebrates.

Rules:
1. Layout: a centered card with the event title as the main heading and the full target date written out below it. Show four equal tiles (Days, Hours, Minutes, Seconds) with oversized tabular numbers that scale from a 360px phone to a 1280px desktop. Put a settings panel underneath with a title field, a datetime-local field and a Start button. Do not use a form element.
2. Behavior: pre-fill a sample event about 12 days ahead so the page looks alive on first load. Pressing Enter in either field applies the changes. Show a friendly inline message for a missing or past time. Include a 10-second demo button and a +1 hour button.
3. Finish: show a status line saying the event has arrived, plus canvas confetti. Skip the confetti and the pop animation when prefers-reduced-motion is set.
4. Sound: use the Web Audio API to play soft blips during the last 5 seconds and a rising chime at zero. Create the AudioContext on the first user interaction, keep the volume low, and add a visible mute toggle.
5. Style: a dark navy palette with an amber accent and a sky-blue accent, a system font stack, high contrast and clear focus outlines.
6. Constraints: no external libraries, fonts, images, storage or network calls, and no alerts.

Output format: one complete HTML file in a single code block, then 3 short ideas to extend it.

Example output

One HTML file. Save it and open it in any browser.Open full screen

Example: Moment Mark, a big-number countdown to any event.

The page opens counting down to a sample "Summer Launch Party" about 12 days away. To set your own event, type a title, pick a date and time, then press Start countdown or Enter. +1 hour pushes the event back by an hour. Try 10-second demo to hear soft blips in the final seconds, then a chime and a burst of confetti. Use the top-right button to mute the sound.

Written by AI from this prompt. Your results will vary.

Tips and common edits

Why this works

  • A pre-filled sample event and a 10-second demo let you see the full countdown and the finish effect without any setup.
  • Tabular numbers and clamp() sizing keep the digits steady and readable on any screen from a phone to a desktop.
  • Audio that starts on the first interaction and confetti that respects reduced motion avoid browser blocks and accessibility problems.

Paste into ChatGPT, Claude or Gemini. Save the reply's code as moment-mark.html and open it in any browser, or preview it in the chat's canvas or artifact view. Click the 10-second demo to see the finish.

Common edits

  • Swap the navy and amber palette for brand colors, or change the confetti colors to match the theme of a birthday, launch or holiday.
  • Add a progress bar showing how much of the wait has passed, or a share line that copies the event name and date as text.

Prompt details

By
Prompts-GPT editors
Published

Did this prompt work?

Keep exploring

More in Mini Apps & Tools