Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

<html>
  <head onload="init();">
    <h1>QUOTE OF THE DAY!</h1>
  </head>
<body onload="init();">
  <div id='quote-box'>
    <div id='text'>
      <div id="author">
        <div id="new-quote" onclick="newQuote();">NEW QUOTE!</div>
        <a id="tweet-quote" href="twitter.com/intent/tweet"></a>
      </div>
      </div>
      </div>
    </div>
        <a href="https://twitter.com/share?ref_src=twsrc%5Etfw" class="twitter-share-button" data-show-count="false">Tweet</a>
      <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<button id="new-quote" onclick="newQuote();">NEW QUOTE!</button>
      
      
  </div>
</body>

</html>
              
            
!

CSS

              
                head{
  font-family: 'Acme', sans-serif;
  color: #E8353A; 
  text-decoration: underline;
}
img{
  height: 200px;
  width: 50%;
}

body {
  background-color: #5b89bc;
  text-align: center;
  font-family: 'Abril Fatface', cursive;
  font-size: 25px;
  animation: bgcolor infinite 30s;
}

@keyframes bgcolor{
  0%{
    background: #5b89bc;
  }
  20%
  {
    background: #EB363C;
  }
  40%
  {
    background: #C026D8;
  }
  60%
  {
    background: #26D8D3;
  }
  80%
  {
    background: #62F349;
  }
  100%
  {
    background: #F3EB49;
  }
}

#quote-box {
  font-family: "Montaga", serif;
  border-radius: 3px;
  position: relative;
  margin: 8% auto auto auto;
  width: 450px;
  padding: 40px 50px;
  display: table;
  background-color: #fff;
}

#text {
  color: black;
  font-family: 'Abril Fatface', cursive;
}
a {
  position: relative;
  right: 50px;
}
#new-quote {
  font-family: 'Abril Fatface', cursive;
  font-size: 14px;
  border-radius: 35%;
  border: 2px solid #000000;
  position: 
}

              
            
!

JS

              
                var quotes = [
  "“Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world.” ―Albert Einstein",
  "“The man who has no imagination has no wings.” ―Muhammad Ali",
  "“What is now proved was once only imagined.” ―William Blake",
  "“You can’t depend on your eyes when your imagination is out of focus.” ―Mark Twain",
  "“Live out of your imagination, not your history.” ―Stephen R. Covey",
  "“Imagination is the beginning of creation. You imagine what you desire, you will what you imagine, and at last, you create what you will.” ―George Bernard Shaw",
  "“Imagination creates reality.” ―Richard Wagner",
  "“Without leaps of imagination, or dreaming, we lose the excitement of possibilities. Dreaming, after all, is a form of planning.” ―Gloria Steinem",
  "“You’re only given a little spark of madness. You mustn’t lose it.” ―Robin Williams",
  "“The imagination is the golden pathway to everywhere.” ―Terence McKenna",
  "“Do not quench your inspiration and your imagination; do not become the slave of your model.” ―Vincent Van Gogh",
  "“You have all the reason in the world to achieve your grandest dreams. Imagination plus innovation equals realization.” ―Denis Waitley",
  "“Trust that little voice in your head that says, ‘Wouldn’t it be interesting if…’; and then do it.” ―Duane Michals",
  "“If you fall in love with the imagination, you understand that it is a free spirit. It will go anywhere, and it can do anything.” ―Alice Walker",
  "“To bring anything into your life, imagine that it’s already there.” ―Richard Bach"
];

var authors = [
  "Albert Einstein",
  "Muhammad Ali",
  "William Blake",
  "Mark Twain",
  "Stephen R. Covey",
  "George Bernard Shaw",
  "Richard Wagner",
  "Gloria Steinem",
  "Robin Williams",
  "Terence McKenna",
  "Vincent Van Gogh",
  "Denis Waitley",
  "Duane Michals",
  "Alice Walker",
  "Richard Bach"
];

function init() {
  var randomNumber = Math.floor(Math.random() * quotes.length);
  document.getElementById('text').innerHTML = quotes[randomNumber];
}

function newQuote() {
  var randomNumber = Math.floor(Math.random() * quotes.length);
  document.getElementById('text').innerHTML = quotes[randomNumber];
  var authQuotes =
      Math.floor(Math.random() * authors.length);
}

function newAuthor(){
  var authQuotes =
      Math.floor(Math.random() * authors.length);
}

document.getElementById('text').style.fontsize = large;


              
            
!
999px

Console