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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

  <title> Quote Generator </title>
    <div class="quote text2" id ="quoteDisplay">
      <h2>Quote of the Day</h2> 
      <button class="text" onclick="newQuote()">New Quote</button>                                               
              body {
  background-color: #16a085 ;

  position: relative;
  margin:20% auto auto auto;
  width: 450px;
  padding: 60px 50px;
  box-shadow: 5px 10px rgb(100, 250, 100);
  font-weight: 500;
  font-size: 1.2em;
   font-size: 20px;
   color: white; 

  font-size: 25px;
  color: rgb(100, 250, 100);
  text-align: center;
  margin: 30px;
  background-color: rgb(100, 250, 100);
  border-radius: 3px;
  display: block;
  padding: 20px 25px 15px 20px;
  opacity: 1;
  cursor: pointer;
  float: right;
  border: none;
  box-shadow: 5px 6px ;

              var quotes =[
" I love you the more in that I believe you had liked me for my own sake and for nothing else.                             ~John Keats",
 " But man is not made for defeat. A man can be destroyed but not defeated.                                          ~Ernest Hemingway",
 "You cannot shake hands with a clenched fist.~Indira Gandhi" ,
"Let us sacrifice our today so that our children can have a better tomorrow.                                     ~A. P. J. Abdul Kalam",
  "You can't blame gravity for falling in love.~Albert Einstein",
  "Coming together is a beginning; keeping together is progress; working together is success.                              ~Henry Ford",
  "I have not failed. I've just found 10,000 ways that won't work.                                                   ~Thomas A. Edison",
  "The secret of getting ahead is getting started.    ~Mark Twain",
  "Everything has beauty, but not everyone sees it.    ~Confucius",
  "The future belongs to those who believe in the beauty of their dreams.                                            ~Eleanor Roosevelt",
  "Where there is love there is life.    ~Mahatma Gandhi",
  "Do not dwell in the past, do not dream of the future, concentrate the mind on the present moment.                            ~Buddha",
  "The best and most beautiful things in the world cannot be seen or even touched - they must be felt with the heart.      ~Helen Keller"
function newQuote(){
  var randomNumber = Math.floor(Math.random() *(quotes.length) );
  document.getElementById('quoteDisplay').innerHTML = quotes[randomNumber];
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.