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.


                <div class="mt6 helvetica measure h-75 bg-white mw5 mw7-ns center pa3 ph5-ns">

  <div class="bg-white measure">
    <blockquote class="flex flex-column justify-center h5 ml0 mt0 mr4 pl4 black-90 bl bw2 b--blue" id="blockquote">
      <span id="text" class="f2"></span>
      <div class="f3">
        - <span id="author"></span>
  <div class="buttons">
    <a class="f6 link dim br2 ph3 pv2 mb2 dib white twitter" id="twitter"><i class = "fa fa-twitter"></i>  Tweet This</a>
    <a class="f6 link dim br2 ph3 pv2 mb2 dib white" id="new-quote">New quote</a>

<div id="tweet-container"></div>

<form method="post" name="Form" action="" class="mt5">
  <label for="userName" class="mr4">If you want to make it personal, type your name: </label>
  <input cols="20" rows="1" name="userName" id="userName" placeholder="name"></input>

<footer class="mt3">
  <small class="ph3 ph4-ns pv6 white-70"> by 
    <a href="" class="static center link b f4 f4-ns dim white-70 lh-solid " target="_blank">Kevin Davis</a>


  background-color: #00aced;
  text-decoration: none;

      border: 5px solid white; 
      inset 0 0 8px  rgba(0,0,0,0.1),
            0 0 16px rgba(0,0,0,0.1); 
      inset 0 0 8px  rgba(0,0,0,0.1),
            0 0 16px rgba(0,0,0,0.1); 
      inset 0 0 8px  rgba(0,0,0,0.1),
            0 0 16px rgba(0,0,0,0.1); 
    padding: 1em;
    background: rgba(255,255,255,0.5);
    margin: 0 0 1em 0;

    width: 30%;
    min-width: 25em;
    border: 5px solid white;
    padding: 15px;
    background: rgba(255,255,255,0.5);
    margin: 0 auto;
    flex-wrap: nowrap;
    min-width: 40em;

  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none;   /* Chrome/Safari/Opera */
  -khtml-user-select: none;    /* Konqueror */
  -moz-user-select: none;      /* Firefox */
  -ms-user-select: none;       /* Internet Explorer/Edge */
  user-select: none;           /* Non-prefixed version, currently
                                  not supported by any browser */



                const quote = document.getElementById("new-quote");
const tweet = document.getElementById("twitter");
let hasName = false;
let httpRequest = new XMLHttpRequest();
let pUrl;
let rUrl = '';
let quoteText;
const quoteAuthor = 'Donald Trump';

document.onreadystatechange = function() {
  if (document.readyState === "interactive") {
window.onload = randBackground;
quote.onclick = nameCheck;
twitter.onclick = tweetIt;
function randBackground() {
  let color = '#' + Math.floor(Math.random() * 16777215).toString(16); = color;
  document.getElementById("blockquote").style["border-color"] = color;

function newQuote() {
  if (!hasName) {
  } else {
  function makeRequest(url) {
    httpRequest = new XMLHttpRequest();

    if (!httpRequest) {
      console.log('Giving up :( Cannot create an XMLHTTP instance');
      return false;
    httpRequest.onreadystatechange = alertContents;'GET', url);

  function alertContents() {
    if (httpRequest.readyState === XMLHttpRequest.DONE) {
      if (httpRequest.status === 200) {
        quoteText = JSON.parse(httpRequest.responseText).message;
        document.getElementById("text").textContent = quoteText;
        document.getElementById("author").textContent = quoteAuthor;

       // console.log(JSON.parse(httpRequest.responseText).message);
      } else {
        console.log('There was a problem with the request.');

 function nameCheck()
    let nameValue =document.forms["Form"]["userName"].value;
      if (nameValue ==null||nameValue==""){
        hasName = false;
      else {
        hasName = true;
        pUrl = "" + nameValue;
function tweetIt(){
  let tweetText = quoteText + " - " + quoteAuthor;
  if (tweetText.length > 140) {
 alert('Tweet should be less than 140 Chars');
 else {
 var twtLink = '' +encodeURI(tweetText)+'&related=kevindavus,freecodecamp,codenewbies';