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="w3-mobile">
  <div class="w3-container" style="padding: 5% 20% 0 20%">
    <h1 class="headTitle">Random Quote Generator</h1>
    <h4 class="headTitle">Click the <em>/New Quote/</em> button for a new Random Quote.<br>You can even "Tweet" your favorite Quotes to your friends too. Check out my other projects here on<br>If not, enjoy this Generator and thank you for stopping by.</h4>
    <div class="w3-container w3-centered">
      <button id="newQuote" class="w3-btn w3-ripple w3-xlarge w3-round-large w3-black w3-hover-green" onclick="quoGen()" style="font-family: 'Jim Nightshade', cursive">New Quote</button>
    <div class="w3-container w3-card-4 w3-mobile" style="margin: 10% 5% 0 5%; padding: 0 5% 1% 5%; background-color: lightblue">
      <div style="text-align: center">
        <p id="quoteGenerator">Click the new quote button.</p>
      <div id="tweet">
        <a href="" class="twitter-share-button" data-url="" data-size="large" data-text="Choose a new quote" data-via="cand1233" data-hashtags="generator" data-related="freeCodeCamp,CodePen" data-show-count="false">Tweet</a>
        <script async src="//" charset="utf-8"></script>
    <footer class="w3-center" style="color: white;"><i class="fa fa-code"></i> Coded by Chris Anderson <i class="fa fa-copyright"></i> freeCodeCamp <i class="fa fa-free-code-camp"></i></footer>



                body {
  background-color: darkblue;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='' width='112' height='92' viewBox='0 0 112 92'%3E%3Cg fill='%24bac146' fill-opacity='0.25'%3E%3Cpath fill-rule='evenodd' d='M72 10H40L16 20H0v8h16l24-14h32l24 14h16v-8H96L72 10zm0-8H40L16 4H0v8h16l24-6h32l24 6h16V4H96L72 2zm0 84H40l-24-6H0v8h16l24 2h32l24-2h16v-8H96l-24 6zm0-8H40L16 64H0v8h16l24 10h32l24-10h16v-8H96L72 78zm0-12H40L16 56H0v4h16l24 14h32l24-14h16v-4H96L72 66zm0-16H40l-24-2H0v4h16l24 6h32l24-6h16v-4H96l-24 2zm0-16H40l-24 6H0v4h16l24-2h32l24 2h16v-4H96l-24-6zm0-16H40L16 32H0v4h16l24-10h32l24 10h16v-4H96L72 18z'/%3E%3C/g%3E%3C/svg%3E");
.backgroundDiv {
.headTitle {
  text-align: center;
div h1 {
  color: white;
  font-size: 43px;
  font-family: "Berkshire Swash", cursive;
div h4 {
  color: lightgray;
  font-size: 24px;
  font-family: "Jim Nightshade", cursive;
#quoteGenerator {
  font-family: "Jim Nightshade", cursive;
  font-size: 38px;
footer {
  font-family: 'IM Fell DW Pica SC', serif;
  font-size: 14px;
  color: white;
  padding-bottom: 5px;


                var quotes = [
  "'The opposite of a correct statement is a false statement. But the opposite of a profound truth may well be another profound truth.' -Niels Bohr",
  "'We accept the Love we think we deserve.' -Stephen Chbosky",
  "'Inner peace begins the moment you choose not to let another person or event to control your emotions.' -Pema Chodron",
  "'You must tell yourself 'No matter how hard it is, or how hard it gets, I'm going to make it.' -Les Brown",
  "'If it won't matter in 5 years, don't spend more than 5 minutes getting angry about it.'",
  "'Think for Yourself. Trust your own Intuition. Another's mind isn't walking your journey, You are.' -Scottie Waves",
  "'The secret of change is to focus all of your energy, not on fighting the old but on building the new.' -Socrates",
  "'You'll never be as lazy as whoever named the fireplace.' -@longwall26",
  "'Why fool around with a hamburger when you have a steak at home?' -Paul Newman",
  "'I don't believe in pessimism. If something doesn't come up the way you want, forge ahead. If you think it's going to rain, it will.' -Clint Eastwood",
  "'The best and most beautiful things in the world cannot be seen or even touched -they must be felt by the heart.' -Helen Keller"
var quote = "Open";

function quoGen() {
  var randNum = Math.floor((Math.random() * quotes.length));
  var randQuo = quotes[randNum];  
  quote = randQuo
  document.getElementById("quoteGenerator").innerHTML = quote;

$("#newQuote").on("click", function(ev) {
  $("#tweet iframe").remove();
  var tweet = $("<a></a>")
        .attr("data-size", "large")
        .attr("href", "")
        .attr("data-url", "false")
        .attr("data-text", $("p:first").text())
        .attr("data-via", "cand1233")
        .attr("data-hashtags", "")
        .attr("data-related", "freeCodeCamp,CodePen")
        .attr("data-show-count", "false")