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

+ 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.


                <script src=""></script>

<div class="container-fluid text-center">
     <h1>Random Quote Machine </h1>
     <p>Great quotes for programmers</p>
     <img  src="" > <br>

     <div  class="quote-box" id="quote-box">
        <div class="col-sm-3" style="text-align:center;">
              <button class="btn btn-primary" type="submit" id="new-quote" >New Quote</button> 
          <button class="btn btn-info">
              <a href= “” class="btn btn-info" type="submit" id="tweet-quote"    >Tweet Quote

        <span class="text" id="text">Write in C.</span> <br><br>
        <span class="author" id="author">Anonymous C programmer</span>



body {
     background-color: forestgreen;

  h1 {
     color: white;
     font-family: "Arial";
     font-size: 50px;
  p {
     color: white;
     font-family: "Helvetica";
     font-style: italic;
     font-size: 30px;

 img {
     padding: 1%;
     width: 9%;
     height: auto;
     margin-left: 45%;
     margin-right: auto;

 .quote-box {
     width: 33%;
     margin-right: auto;
     margin-left: auto;
     border-color: salmon;
     border-style: solid;
     border-radius: 5px;
     margin-top: 20px;
     padding: 20px;
     height: auto;
     color: white;

  .quote-box {
     font-family: "Verdana";
     line-height: 1.2;
     font-size: 30px;

  .author {
     font-size: 20px;
     fotn-style: italic;


                var randomNum; 
var randomQuote="Write in C."; 
var randomAuthor="Anonymous C programmer";

function getQuotes() {
       var quotes = ["Be nice to nerds. Chances are you'll end up working for one.", 
                         "Stay hungry, stay foolish.",  
                         "UNIX ia basically a simple operationg system, but you have to be a genius to understand the simplicty.",
                         "Errors using inadequate data are much less than those using no data at all.",
                          "If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.",
                          "Any customer can have a car painted any colour he wants so long as it is black."

       var authors=["Bill Gates", 
                        "Steve Jobs", 
                        "Dennis Ritchie",
                        "Charles Babbage",
                        "John von Neumann",
                        "Henry Ford"

       randomNum = Math.floor((Math.random()*quotes.length));
       randomQuote = quotes[randomNum];
       randomAuthor = authors[randomNum];

$(document).ready( function() {

    $("#new-quote").on("click", function() {

    $('#tweet-quote').on("click", function() {
       text = randomQuote + " - " + randomAuthor;
   "" + text);