HTML Date with Countdown Timer

Description

  • You can use the following generator to create a countdown clock that will count down the seconds, minutes, hours, days remaining until your target date.

Note

  • If you want to change the size, font, or color you can edit the last line of your generated code and add a style="" property like: <div id="countbox" style="font:14pt Arial; color:#FF0000;"></div>
  • If you want to use multiple countdowns on the same page, you'll need to use the modified version for multiple countdowns.

Steps

  1. Fill in the required target Date and target Time information
  2. Generate the HTML and JavaScript code for your countdown (button at bottom)
  3. You can preview your script (button at bottom)
  4. Copy and Paste the Source Code into your HTML page


Date Expires
Year:
Month:
Day:
Time Expires
Hour:
Minute:
Second:



Source Code
Your countdown expires: (select Preview first)

Comments

what if I want two on the same page?

How can I get two of these on the same page? I've tried changing the function names and calls, and the element thing, but now I've got the second one working and the first one not appearing!

multiple countdowns

You'll need some basic HTML knowledge, but I created a modified that allows you to easily create multiple unlimited countdowns on the same page.

multiple countdown times on one page

There are 3 places in the script you'll need to edit. Search the source on the above link for the word "CHANGE" and you should be able to find all 3. You can move the output boxes like <div id="countbox1"></div> to wherever you want the countdown to appear on the page (they don't need to be in the same place).

If you have trouble calculating the "dateFuture" you need for each countdown, use the generator on this page then copy and paste the "new Date" line into the script (just make sure you change it to a dateFuture<digit> name on each one.)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.