Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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.


Save Automatically?

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.


                <html lang="en" >
  <meta name="viewport" content="width=device-width, initial-scale=1">
    function cdtd() {
      var olympicGames = new Date("July 24, 2020 00:01:00");
      var now = new Date();
      var timeDiff = olympicGames.getTime() - now.getTime();
      if (timeDiff <= 0) {
        document.write("Olympic games are here!");
        // Run any code needed for countdown completion here
      var seconds = Math.floor(timeDiff / 1000);
      var minutes = Math.floor(seconds / 60);
      var hours = Math.floor(minutes / 60);
      var days = Math.floor(hours / 24);
      hours %= 24;
      minutes %= 60;
      seconds %= 60;

      document.getElementById("daysBox").innerHTML = days;
      document.getElementById("hoursBox").innerHTML = hours;
      document.getElementById("minsBox").innerHTML = minutes;
      document.getElementById("secsBox").innerHTML = seconds;
      var timer = setTimeout('cdtd()',1000);
<body ng-app="BlankApp">
  <!-- Your HTML content here -->
  <!--------  Today's theme --------->
  <div layout="row" class="theme" layout-align="center center">Day 14: Countdown Timer</div>

  <!--------  Working area --------->
  <div class="working-area">
    <h2 style="text-align: center"> Countdown Timer | Olympic games</h2>
    <div layout="row" class="theme" layout-align="center center">
      <img src="" alt="olympic games counter">
    <div style="text-align: center">
      <h2>24 July to 9 August 2020 in Tokyo</h2>
      Days: <span id="daysBox"></span> |
      Hours: <span id="hoursBox"></span> |
      Minutes: <span id="minsBox"></span> |
      Seconds: <span id="secsBox"></span>
  <!--------  Footer --------->
  <div layout="row" layout-align="center center" class="background-color-green"><h3>Youtube tutorial <a href="" target="_blank"> here!</a></h3></div><br>
  <div layout="row" layout-align="center center" class="background-color-green">Created by Eleftheria</div>
  <div id="footer" layout="row" layout-align="center center" class="background-color-green">
      <!-- Linkedin -->
      <a href="" target="_blank"><img src="" class="footer_image" alt="linkedin" title="linkedin"></a> ~
      <!-- Codepen -->
      <a href="" target="_blank"><img src="" class="footer_image" alt="codepen" title="codepen"></a> ~
      <!-- Youtube -->
      <a href="" target="_blank"><img src="" class="footer_image" alt="youtube" title="youtube"></a> ~
      <!-- Twitter -->
      <a href="" target="_blank"><img src="" class="footer_image" alt="twitter" title="twitter"></a> ~
      <!-- Github -->
      <a href="" target="_blank"><img src="" class="footer_image" alt="github" title="github"></a> ~ 
      <!-- Instagram -->
      <a href="" target="_blank"><img src="" class="footer_image" alt="instagram" title="instagram"></a> ~
    <!-- Website -->
      <a href="" target="_blank"><img src="" class="footer_image" alt="website" title="website"></a>
  <!-- Angular Material requires Angular.js Libraries -->
  <script src=""></script>
  <!-- Your application bootstrap  -->
  <script type="text/javascript">    
   angular.module('BlankApp', ['ngMaterial', 'ngMessages']);




                body {
  background-image: linear-gradient(to top, #a8edea 0%, #fed6e3 100%);

.theme {
  padding: 32px 0 32px 0;

.working-area {
  width: 90%;
  height: 80%;
  margin: 0 auto;
  background-color: rgba(142,36,170,0.3);
  padding: 16px;
  border-radius: 8px;

#footer .footer_image {
  height: 24px;
  text-align: center;
  padding: 4px;