Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

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


Auto Save

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 id="box">
  <h1>H.H The Dalai Lama's Quotes</h1>
  <blockquote> "The purpose of our lives is to be happy." </blockquote>
  <button id = "nextQuote" type="button" class="btn btn-primary"> Next Quote please </button>
<a href="" target="_blank" id="tw-an" class="pull-right">Tweet this quote</a>




                body {background-color:blue;}
#box {margin: 20px auto 20px auto; padding: 20px 20px 20px 20px; max-width:600px; background-color: white;}
blockquote {font-size:1.5em;}



                /*window.twttr = (function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0],
    t = window.twttr || {};
  if (d.getElementById(id)) return t;
  js = d.createElement(s); = id;
  js.src = "";
  fjs.parentNode.insertBefore(js, fjs);

  t._e = [];
  t.ready = function(f) {

  return t;
}(document, "script", "twitter-wjs"));
var colors=["yellow", "green", "red", "purple", "pink", "gray", "blue" ];
var quotes = ['Be kind whenever possible. It is always possible.','Happiness is not something ready made. It comes from your own actions.', 'This is my simple religion. There is no need for temples; no need for complicated philosophy. Our own brain, our own heart is our temple; the philosophy is kindness.', 'Our prime purpose in this life is to help others. And if you can\'t help them, at least don\'t hurt them.', 'Remember that sometimes not getting what you want is a wonderful stroke of luck.', 'If you want others to be happy, practice compassion. If you want to be happy, practice compassion.', 'In the practice of tolerance, one\'s enemy is the best teacher.', 'My religion is very simple. My religion is kindness.', 'We can never obtain peace in the outer world until we make peace with ourselves.', 'The purpose of our lives is to be happy.'];
$(document).ready(function() {
    $("#nextQuote").on("click", function(){
      var quote = quotes[Math.floor(Math.random()*quotes.length)];   
      var url = ""
      var urlQ = quote.replace(" ", "%20");
      url += urlQ;

      $("body").css("background-color", colors[Math.floor(Math.random()*colors.length)]);
  $("#tw-an").attr("href", url)