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.


                <div class="main">
  <p id="quote">Work like you don’t need money, love like you’ve never been hurt, and dance like no one’s watching
—Unknown Author</p>
  <button id="newQuote" onclick="myFunction()">New quote</buttton>
    <button id="tweet" onclick="tweeter()"><i class="fa fa-twitter"></i>Tweet it
  <p>Designed by "Y Studio"</p>
  <p>Contact information: <a href=""></a></p>


button {
  background-color: pink;
  padding: 5px;
  border-radius: 10px;

.main {
  background-color: white;
  border-radius: 10px;
  width: 30%;
  padding: 50px 50px;
  margin-top: 20%;
  margin-left: 30%;
  height: 200px;
  width: 400px;
  position: relative;

#newQuote {
  position: absolute;
  bottom: 35px;
  right: 60px;

#tweet {
  position: absolute;
  bottom: 35px;
  left: 60px;

footer {
  backgound-color: grey;
  position: absolute;
  bottom: 20px;
  width: 60%;


                var i = 1;
  var array = ['Life is about making an impact, not making an income. –Kevin Kruse', 'Whatever the mind of man can conceive and believe, it can achieve. –Napoleon Hill', 'Strive not to be a success, but rather to be of value. –Albert Einstein', 'Two roads diverged in a wood, and I—I took the one less traveled by, And that has made all the difference.  –Robert Frost', 'I attribute my success to this: I never gave or took any excuse. –Florence Nightingale', 'I’ve missed more than 9000 shots in my career. I’ve lost almost 300 games. 26 times I’ve been trusted to take the game winning shot and missed. I’ve failed over and over and over again in my life. And that is why I succeed. –Michael Jordan', 'The most difficult thing is the decision to act, the rest is merely tenacity. –Amelia Earhart', 'Every strike brings me closer to the next home run. –Babe Ruth', 'Definiteness of purpose is the starting point of all achievement. –W. Clement Stone', 'Life isn’t about getting and having, it’s about giving and being. –Kevin Kruse', 'Life is what happens to you while you’re busy making other plans. –John Lennon'];console.log(i);
function myFunction() {
document.getElementById("quote").innerHTML = array[i++%array.length];
function tweeter(){"" + array[i-1]); }