css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.


    <link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Encode+Sans+Expanded" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <link href="style.css" rel="stylesheet">



    <div id="header">
        <h1>My Quote Machine</h1>

    <div id="quote">

        <i class="fa fa-quote-left" aria-hidden="true" style="font-size: 15px; bottom: 10px;"></i>
        <h1>I shall not waste my days in trying to prolong them.</h1>


    <div id="press">
        <div id="icon">
            <a id="twitterid" href="https://twitter.com/intent/tweet/?text=" target="_blank"><i class="fa fa-twitter fa-2x" style="color: white"></i></a>
        <button class="btn btn-lg">Quote</button>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

    <script src="javascript.js" type="text/javascript"></script>


              body {
    margin: 0;
    padding: 0;
    background-color: #37474F;
    background-image: url("https://images.unsplash.com/photo-1502657877623-f66bf489d236?auto=format&fit=crop&w=1500&q=60&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D");
    background-size: cover;
    background-repeat: no-repeat;


#header {
    font-family: 'Lobster', cursive;
    color: white;
    text-align: center;
    letter-spacing: 3px;
    word-spacing: 4px;
    border-bottom: solid 4px red;
    margin: 0px 200px;
    padding: 5px 40px;

#header h1 {
    font-size: 60px;

#quote {
    background-color: #cc3914;
    opacity: 0.9;
    width: 60%;
    min-height: 200px;
    border: 2px solid white;
    border-radius: 10px;
    font-family: 'Encode Sans Expanded', sans-serif;
    font-size: 30px;
    margin: auto;
    margin-top: 20px;
    padding: 35px;
    text-align: center;
    color: white;
    word-spacing: 5px;

#quote h1 {
    font-size: 30px;

#press {
    text-align: center;
    margin: auto; 
    //background-color: pink;
    height: 70px;
    width: 65%;
    margin-top: 10px;


.btn {
    background-color: orange;
    width: 30%;
    height: 40px;
    color: purple;
    border-radius: 10px;
    font-size: 20px;

.btn:hover {
    background-color: darkorchid;
    color: white;
    letter-spacing: 2px;
    box-shadow: 5px 5px 3px grey;

#icon a {
    float: left;
    margin-bottom: 50px;
    //background-color: aqua;
    display: block;

#quote i {
    float: left;
    margin-top: 10px;
    margin-left: 10px;

              var quotes = [
  "The Way Get Started Is To Quit Talking And Begin Doing.",
  "The Pessimist Sees Difficulty In Every Opportunity. The Optimist Sees Opportunity In Every Difficulty.",
  "Don't Let Yesterday Take Up Too Much Of Today.",
  "You Learn More From Failure Than From Success. Don't Let It Stop You. Failure Builds Character.",
  "It's Not Whether You Get Knocked Down, It's Whether You Get Up.",
  "If You Are Working On Something That You Really Care About, You Don't Have To Be Pushed. The Vision Pulls You.",
  "People Who Are Crazy Enough To Think They Can Change The World, Are The Ones Who Do",
  "Failure Will Never Overtake Me If My Determination To Succeed Is Strong Enough.",
  "Entrepreneurs Are Great At Dealing With Uncertainty And Also Very Good At Minimizing Risk. That's The Classic Entrepreneur",
  "We May Encounter Many Defeats But We Must Not Be Defeated",
  "Knowing Is Not Enough; We Must Apply. Wishing Is Not Enough; We Must Do",
  "Imagine Your Life Is Perfect In Every Respect; What Would It Look Like?"

function makeId() {
  var randomNumber = Math.floor(Math.random() * quotes.length);
  $("#quote > h1").html(quotes[randomNumber]);
  var tweet = $("#twitterid");
  tweet.attr("href", tweet.attr("href").split("text=")[0] + "text=" + quotes[randomNumber]);
$(document).ready(function() {
  $("#press > button").click(function() {
    $("#quote > i")

    $("#quote > h1").fadeOut("slow", function() {

🕑 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.
Loading ..................