Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <h1 id="display"></h1>
		<p id="Days"></p>
		<p id="Hours"></p>
		<p id="Min"></p>
		<p id="Sec"></p>


		padding: 0;
		margin: 0;
		width: 100%;
		height: 100vh;
		display: flex;
		align-items: center;
		justify-content: center;
		background-color: red;
		display: flex;
	div p{
		border: 1px solid black;
		text-align: center;
		font-size: 35px;
		width: 135px;
		margin-left: 5px;
		padding: 10px;
		border-radius: 10px;
		background-color: lightblue;

		border-radius: 10px;
		background-color: lightblue;


// Set the target date and time for the countdown
const targetDate = new Date('2023-12-31T01:59:59');

// Get the countdown container element
const countdownDisplay = document.getElementById('display');
const daysElement = document.getElementById('Days');
const hoursElement = document.getElementById('Hours');
const minElement = document.getElementById('Min');
const secElement = document.getElementById('Sec');

// Update the countdown every second
const countdownInterval = setInterval(updateCountdown, 1000);

function updateCountdown() {
  // Get the current date and time
  const currentDate = new Date();

  // Calculate the remaining time in seconds
  const remainingTime = Math.floor((targetDate - currentDate) / 1000);

  // Check if the countdown has ended
  if (remainingTime <= 0) {
    countdownDisplay.innerHTML = 'Countdown has Ended <br> HAPPY NEW YEAR!';

  // Calculate the days, hours, minutes, and seconds
  let days = Math.floor(remainingTime / (3600 * 24));
  let hours = Math.floor((remainingTime % (3600 * 24)) / 3600);
  let minutes = Math.floor((remainingTime % 3600) / 60);
  let seconds = remainingTime % 60;

    // Update the countdown element
  daysElement.innerHTML = `${days} <br> Days`;
  hoursElement.innerHTML = `${hours} <br> Hours`;
  minElement.innerHTML = `${minutes} <br> Minutes`;
  secElement.innerHTML = `${seconds} <br> Seconds`;