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 is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.


<div class="display">
  <h2>Sweet whale sounds, bro.</h2>
  <div class="play-button" onClick="togglePlay()">
    <i class="fa fa-play"></i>
    <i class="fa fa-pause"></i>


  height: 100vh
  width: 100vw
  margin: 0
  box-sizing: border-box
  background: rgb(195,115,238)
  background: linear-gradient(45deg, rgba(195,115,238,1) 0%, rgba(43,65,207,1) 100%)
  font-family: 'helvetica', 'arial', open-sans
    box-sizing: border-box
  color: #FFF
/* Just to center everything
  position: absolute
  top: 50%
  left: 50%
  transform: translate(-50%,-50%)

/* Play Button 
  height: 100px
  width: 100px
  border-radius: 50px
  background: rgb(254,118,51)
  background: linear-gradient(0deg, rgba(254,118,51,1) 0%, rgba(253,197,65,1) 100%)
  text-align: center
  box-shadow: 0 0 5px rgba(0,0,0,.3)
  cursor: pointer
  margin: 0 auto
      display: block
      display: none
    position: relative
    display: none
    left: 0
    position: relative
    left: 4px
    text-align: center
    font-size: 60px
    line-height: 100px
    color: #FFF
    opacity: .8
    text-shadow: 0 0 8px rgba(0,0,0,.4)


                // Get Audio Track
var myAudio = new Audio('');
// Init isPlaying Variable
var isPlaying = false;

// Pause or Play Audio
function togglePlay() {
  if (isPlaying) {
  } else {

myAudio.onplaying = function() {
  isPlaying = true;
myAudio.onpause = function() {
  isPlaying = false;