Samples of Countdown Timers


Style 1a

Style 2a

Style 2b

Style 1b

Style 3a

Style 3b


Countdown to a date & time with time zone setting

Below are samples and links to the JavaScript codes of a countdown timer in a variety of styles.  I first found a JavaScript code for a countdown timer at but it only counted down to a specified date, so I modified it to add the ability to countdown to a date and time, then modified it some more into the variety of styles that are sampled below.

This site provides instructions for inserting a countdown timer into your web page using either Apple's iWeb or other HTML editors.  For instructions if you are using iWeb'06 (version 1.0; part of iLife '06), click here; if you are using iWeb '08 (version 2.0; part of iLife '08) or iWeb ’09 (version 3.0; part of iLife ’09), click here.  To get instructions on how to insert the countdown timer code in another HTML editor, click here.

The code for the timer includes a time zone setting so that the countdown timer counts down to the date and time based on the time zone you select, not on the viewer’s time zone.  Without this setting, if I set the countdown target date to, for example, January 10 at 12:00pm, the timer would count down to that date and time at the time zone of the viewer.  In other words, I am in Cleveland, Ohio, USA (Eastern Time Zone) but if someone is in Sydney, Australia, then the countdown timer viewed from their computer in Sydney would countdown to Jan 10, 12:00pm Sydney time, not Cleveland time.  Now, with this new time zone setting it would count down to 12:00pm Cleveland time, regardles of where one is viewing it.  You are able to set the time zone that you want it to count down to in the script.

Style 1c

Style 1d

Google Chrome (Windows and Mac)

Internet Explorer 6 & greater (Windows)

FireFox 2.x & greater (Windows and Mac)

Safari 3.x & greater (Windows and Mac OS 10.4.9 and higher)

Note: the scripts for these timers have been tested and will show up and work appropriately on the browsers noted below.  These include Safari 3.x and greater on both a Mac running OS 10.4.9 and later, including Mac OS 10.5 (Leopard) through 10.8 (Mountain Lion), and a PC running Windows XP, Vista or Windows 7; FireFox 2.x and greater on Mac and Windows; Google Chrome on Mac and Windows; and Internet Explorer 6.0 and greater on Windows.

Feel free to e-mail me with any questions, comments, suggestions or to let me know of other browsers that either support or don't support the codes as shown.

Email Me

NOTE: if you are using iWeb '06 (version 1.x), see the instructions here.


Comments (177)

Page 5 of 18
Bob Kuhnhenn (Westlake, OH, USA) wrote...
Sorry for the delay in responding. Could you send me a link to your page that has the timer so I can take a look at the source code and see what the problem might be. I can look in to it this weekend.

May 23, 2014 @ 2:42 AM EDT
cristobal paez (barcelona, Spain) wrote...
Thaaaannnnnkkkkssss!!!! again, THANKSSSSSS!!! All the Gods bless you all!

April 28, 2014 @ 2:11 PM EDT
Adam wrote...
These timers look great! If you'd like to do something similar for email, a service called Motion Mail at lets you embed a countdown in your email. Great for sales or other offers!

February 27, 2014 @ 2:24 AM EST
Lorraine Pierce (Vidor, USA) wrote...
Is it possible to have a timer that resets with every new visitor to the page?

I'm trying to set up a time sensitive special offer.

November 21, 2013 @ 8:22 AM EST
Bob Kuhnhenn (Westlake, OH, USA) wrote...
Unfortunately, that is beyond my knowledge of javascript, if it is even possible to do.

November 21, 2013 @ 7:16 PM EST
Alex wrote...
I am using Style 1B and was wondering how to add a title to the timer.

October 14, 2013 @ 5:47 PM EDT
Bob Kuhnhenn (Westlake, OH, USA) wrote...
To add a title to the timer, add the following line right after the <table id="table" border="0"> tag:
    <td align="center" colspan="6" id="timerTitle">Timer Title</td>

and add the following styling to the <style> tag in the <head> section (you can change these as you wish):
#timerTitle {
    font-family: Arial;
    font-size: 20px;
    font-weight: bold;
    color: #FFFFFF;
    padding: 3px;

October 15, 2013 @ 1:50 AM EDT
Bob Kuhnhenn (Westlake, OH, USA) wrote...
To redirect the page to another page once the timer counts down to "0" and your timer code is inside an iframe, add the following code:'';
(where "" is the URL of the page to where you want to redirect.)

right after this line in the code:


If your timer code is on the page itself (not in an iframe), add the following code:
right after this line in the code:

This answer was edited on December 27, 2014 @ 12:43 AM EST to show the coding differences when timer code is within an iframe or within the main page.

September 27, 2013 @ 11:02 PM EDT
andrew (USA) wrote...
How can I add months and weeks to the countdown display?

September 19, 2013 @ 1:14 PM EDT
Page 5 of 18

Add Comment