Html5 Happy New Year Script

Html5 New year countdown script, displays the time left till Newyear in days, hours, minutes and seconds.


  • The countdown timer tracks the days until New Year.
  • Script helps to count exactly the days, hours, minutes and seconds left for the New year.
  • Responsive and easy to integrate.


New Year Countdown

: :



<!--Scripts by><!--More scripts @>
<html> <head>
<title>Html5 Happy New Year | Newyear Countdown Script </title>
<style type="text/css">
#contentdiv {
color: #75ab22; font-family: Tahoma,Geneva,sans-serif;
font-size: 2.2em;
font-weight: bold;
height: 150px;
line-height: normal;
padding: 20px;
text-align: center;
text-shadow: 0 0 5px #acfa58; border-radius:25px;
} .blink {
-moz-animation: sep-blinks 1s linear 0s infinite;
-webkit-animation: sep-blinks 1s linear 0s infinite; animation: sep-blinks 1s linear 0s infinite;
} @-moz-keyframes sep-blinks {
0% {opacity:1}
50% {opacity:0}
100% {opacity:1}
@-webkit-keyframes sep-blinks
0% {opacity:1}
50% {opacity:0}
100% {opacity:1}
@keyframes sep-blinks
0% {opacity:1}
50% {opacity:0}
100% {opacity:1}
@media screen and (max-width: 480px){#contentdiv{font-size: 18px !important;height: 100px !important;}} </style> </head> <body>
<div align='center'> <b><font style='font-size: 15px;'>New Year Countdown</font></b><br><br> <div id="contentdiv"> <span id="nday"></span> Days<br /><br />
<span id="nhr"></span><span class="blink"> : </span> <span id="nmins"></span><span class="blink"> : </span> <span id="nsecs"></span> </div><br><br> <div id="dumdiv" align="center" style="font-size: 10px;color: #dadada;">
<a id="dum" style="font-size: 10px;color: #dadada;text-decoration:none;color: #dadada;" href="">©h</a> </div> </div>
<script type="text/JavaScript">
function startTimer() {
var time = new Date();
var cur_year=time.getFullYear();
var month = time.getUTCMonth() + 1; //months from 1-12
var day = time.getUTCDate();
var n=cur_year+1;
var newyr=new Date("January 1,"+n+" 00:00:00");
var newyeartime=newyr.getTime();
var todaytm=new Date();
var todaytime=todaytm.getTime();
var timeleft=newyeartime-todaytime;
var leftdays = timeleft/86400000;
var lefthr=23-todaytm.getHours();
var leftmin=59-todaytm.getMinutes();
var leftsec=59-todaytm.getSeconds();
if ((Math.floor(leftdays) <= -1) || (month==1 && day==1)) { document.getElementById('contentdiv').innerHTML="Happy New Year "+n;
else { document.getElementById('nday').innerHTML= Math.floor(leftdays); document.getElementById('nhr').innerHTML= lefthr+" hrs"; document.getElementById('nmins').innerHTML= leftmin+" mins"; document.getElementById('nsecs').innerHTML= leftsec+" secs";
} t=setTimeout('startTimer()',999); }

function chk(){

var sds = document.getElementById('dum');

if(sds == null){alert("You are using a free package.\n You are not allowed to remove the tag.\n");



var sdss = document.getElementById("dumdiv");

if(sdss == null){alert("You are using a free package.\n You are not allowed to remove the tag.\n");}


window.onload=chk; </script> </body></html><!--Scripts by>
  • Release Date - 31-12-2015
  • Get free version without ©copyright link for just $10/-
  • For customization of this script or any script development, mail to


  • Copy, paste the above code and run it in your webpage.
  • startTimer() is the function used here to count the remaining time.
  • Use our count down timer and keep track of the time left till next New Year .


Related Scripts

Free Javascript Scripts

Ask Questions

Ask Question