Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style media="screen">
  @import url('https://fonts.googleapis.com/css2?family=Amatic+SC&display=swap');

* {
  box-sizing: border-box;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90vh;
  background: #0a9c93;
  font-family: sans-serif;
}
.container{
  background: white;
  border-radius: 7px;
  width: 400px;
  padding: 15px;
}
h1 {
  font-size: 2rem;
  color: #3d353d;
}

#weekday {
  font-size: 2.3rem;
  color: #0650ac;
  text-transform: uppercase;
  font-weight: 800;
  text-align: center;

}

#quote {
  font-size: 1.8rem;
  color: #133030;
  margin-top: 20px;
  text-align: center;
}
  </style>
</head>
<body>
  <div class="container">
              <h1>Today is : </h1>
              <div class="weekday">
                  <div class="" id="weekday">
                      Display Day of The Week.
                  </div>

                  <div id="quote">Display a quote</div>
              </div>
          </div>
<script type="text/javascript">
let date = new Date();
let dayNumber = date.getDay();
let theDayIs;
let quote;

switch(dayNumber){
    case 0:
        theDayIs = 'Sunday';
        quote = 'Time to chillax!';
        break;
    case 1:
        theDayIs = 'Monday';
        quote = 'Monday morning blues!';
        break;
    case 2:
        theDayIs = 'Tuesday';
        quote = 'Taco Time!';
        break;
    case 3:
        theDayIs = 'Wednesday';
        quote = 'Two more days to the weekend.';
        break;
    case 4:
        theDayIs = 'Thursday';
        quote = 'The weekend is almost here...';
        break;
    case 5:
        theDayIs = 'Friday';
        quote = 'Weekend is here!';
        break;
    case 6:
        theDayIs = 'Saturday';
        quote = 'Time to party 🎉';
        break;
}

let spanOfWeekday = document.getElementById("weekday");
spanOfWeekday.innerHTML = `${theDayIs}`;

let spanOfQuote = document.getElementById("quote");
spanOfQuote.innerHTML = `${quote}`;
</script>
</body>
</html>

              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console