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

              
                

<body class="background" >

 <div class="container-fluid text-center">
    <h1>Quote Machine</h1>
    <div class="well welll " id = "dog">The quote will appear here.</div>
   <div id="message"></div>
    <button  type"button" onclick="myFunction1()" class="btn btn-primary" >Click here for a new quote</button>
   
   <button onclick="myFunction2()" class="btn " style="background-color:#00D5FF; color:white;"white><i class="fa fa-twitter">Tweet here!</i></button>
    </div>
  
  <p>Coded by - John Vincent<p>
    
</body>
              
            
!

CSS

              
                h1{
  font-family:monospace;
  font-size:;
}
.background {
  background-image:url();
  background-size:cover;
}

.welll {
  margin-right:auto;
  margin-left:auto;
  margin-top:100px;
  margin-bottom:100px;
  width:50em;
}
p {
  text-align:right;
  margin-top:5em;
  margin-right: 10px;
  font-size:20px;
  color:yellow;
   
}
              
            
!

JS

              
                

// click settings
function myFunction1() {

//quotes

  var a = ["“Peace cannot be kept by force. It can only be achieved by understanding.” - Albert Einstein",
           
           "“Wisdom is not a product of schooling but of the lifelong attempt to acquire it.” - Albert Einstein",
           
           "“A human being is a part of the whole, called by us Universe, a part limited in time and space.” - Albert Einstein",
           
           "“The best and most beautiful things in the world cannot be seen or even touched, they must be felt with the heart.” - Helen Keller",
           
           "“It is during our darkest moments that we must focus to see the light.” - Aristotle Onassis",
           
           "“Find a place inside where there is joy, and the joy will burn out the pain.” - Joseph Campbell",
           
           "“Nothing is impossible, the word itself says 'I'm possible'!” - Audrey Hepburn",
           
           "“Don't judge each day by the harvest you reap but by the seeds that you plant”. - Robert Louis Stevenson",
           
           "“You must be shapeless, formless, like water. When you pour water in a cup, it becomes the cup. When you pour water in a bottle, it becomes the bottle. When you pour water in a teapot, it becomes the teapot. Water can drip and it can crash. Become like water my friend.”- Brucee Lee",
           
           "“Its like a finger pointing away to the moon. Dont concentrate on the finger or you will miss all that heavenly glory.”- Brucee Lee"];
  
   var x = Math.floor((Math.random() * a.length) +0);
  var b = a[x];
 
document.getElementById("dog").innerHTML = b;

}
 function myFunction2() {
 var tweet = document.getElementById("dog").innerHTML ;
	window.open("https://twitter.com/intent/tweet?text="+ tweet);
    }

              
            
!
999px

Console