Calculator Tools Calculator Tools

Fun Countdown Timer

Jul 19, 2026

About this app

Create a vibrant and interactive countdown timer that announces the next festive date. Customize your message and see the countdown in a colorful design.

Fun Countdown Timer Countdown Timer Get ready for the next big celebration!

Put this on your site

Source

                    <html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>Fun Countdown Timer</title>
<meta name="description" content="Create a vibrant and interactive countdown timer that announces the next festive date. Customize your message and see the countdown in a colorful design.">
<meta name="keywords" content="countdown timer, festive countdown, colorful timer, interactive timer">

<!-- Libraries -->
<!-- jQuery (3.6.0) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js" crossorigin="anonymous"></script>
<!-- Bootstrap CSS (5.3.3) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" crossorigin="anonymous">
<!-- Bootstrap JS (5.3.3) -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js" crossorigin="anonymous"></script>
<!-- Font Awesome (6.6.0) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.6.0/css/fontawesome.min.css" crossorigin="anonymous">

<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.

// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
const countdownDate = new Date("December 31, 2024 23:59:59").getTime();
const timerElement = document.querySelector("#timer");
const messageElement = document.querySelector("#custom-message");

const countdownFunction = setInterval(function() {
const now = new Date().getTime();
const distance = countdownDate - now;

// Time calculations for days, hours, minutes and seconds
const days = Math.floor(distance / (1000 * 60 * 60 * 24));
const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((distance % (1000 * 60)) / 1000);

// Display the result
timerElement.innerHTML = `<div class="countdown-display">${days}d ${hours}h ${minutes}m ${seconds}s</div>`;

// If the countdown is over, display the message
if (distance < 0) {
clearInterval(countdownFunction);
timerElement.innerHTML = `<div class="countdown-ended">THE COUNTDOWN HAS ENDED!</div>`;
}
}, 1000);
});

} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>

<style>
body {
background: linear-gradient(to right, #00c6ff, #0072ff);
color: white;
font-family: 'Arial', sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
text-align: center;
transition: background 0.3s ease;
}

.countdown-display {
font-size: 48px;
font-weight: bold;
margin: 10px 0;
animation: bounce 1s infinite;
}

.countdown-ended {
font-size: 36px;
color: #ff69b4;
font-weight: bold;
margin: 20px 0;
animation: flash 1.5s infinite;
}

@keyframes bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-20px); }
}

@keyframes flash {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>Countdown Timer</h1>
<div id="timer"></div>
<p id="custom-message">Get ready for the next big celebration!</p>
</div>
</body>
</html>