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

              
                <div class="container-fluid text-center" 
     <div>
  <div class="text-center" 
       </br>
    <h1> Quote Machine </h1>
    <p>These are some of my favorite quotes.</p>
    </br>
    <button class="btn btn-default" type="submit" id="newQuote">New Quote</button>
    <button class="btn btn-default" type="submit" id="tweetOut">Tweet Out</button>

  </div>
  <div class="quotes text-center">
    <span class="quote"></span>
    </br>
    <span class="author"></span>

  </div>
</div>
</div>
              
            
!

CSS

              
                body {
  background-color: white;
}
h1 {
  color: #800020;
  font-family: "Times New Roman";
  font-size: 50px;
}
p {
  color: #800020;
  font-family: "Times New Roman";
  font-style: italic;
  font-size: 30px;
}
.quotes {
  color: white;
  width: 30%;
  background-color: #04460e;
  margin-left: auto;
  margin-right: auto;
  border-color: white;
  border-style: solid;
  border-radius: 7px;
  margin-top: 20px;
}

.btn {
 color: #800020; 
}

              
            
!

JS

              
                $(document).ready(function(){
  function getQuote(){
    var randomQuote;
    var randomNum;
    var author;
    getQuote();
var quotes = [
  "Whatever you are, be a good one.",
  "be fearless in the pursuit of what sets your soul on fire",
  "let your smile change the world, but don't let the world change your smile", "I wanted to invent an engine that could run forever. I could have developed a new train, had I stayed in the railway. It would have looked like the AK-47 though.", "An armed society is a polite society"
];

author = ["-doctor seuss","-unknown","-unknown","-Mikhail Kalashnikov","-Robert Heinlein"];
randomNum = Math.floor(Math.random()*quotes.lenght);
 randomquote = quote[randomNum];
$(".quote").text(randomQuote);
$(".author").text(author);
  }
$("#newQuote").on("click", function(){
  getQuote();
});
$("#tweet").on("click", function(){
  window.open("https://twitter.com/intent/tweet?text=" + randomQuote + " " + author);
  
  
});
});



              
            
!
999px

Console