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.

              <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Muli" rel="stylesheet">
<div id="wrapper">
  <div id="quote-box">
    <div id="quote-text">
      <i id="quote-icon-1" class="fa fa-quote-left font-size: 28px"></i>
      <span id="text">The mind is everything. What you think you become</span> <i id="quote-icon-2" class="fa fa-quote-right font-size: 28px"></i>
    <div id="author-box">
      <span id="author" class="text-center">Buddha</span>
    <div id="buttons">

      <button id="tweet-button" type="button" class="btn btn-outline-primary"><i class="fab fa-twitter"></i><a id="tweet-quote" class="twitter-share-button" href="twitter.com/intent/tweet" data-size="large" target="_blank"></a></button>

      <button id="new-quote" type="submit" class="btn btn-outline-primary">New Quote</button>

              div {
  position: relative;
  z-index: 2;

body {
  font-family: "Muli", sans-serif;
  background-image: url("https://img00.deviantart.net/c01b/i/2008/066/a/6/hokusai__s_great_wave_download_by_pooxie.jpg");
  background-repeat: no-repeat;
  background-size: 100vw 100vh;
  font-weight: 400;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
#wrapper {
  width: 500px;
  height: 425px;
#quote-box {
  border-radius: 5px;
  background-color: #ffebcd;
  width: 500px;
  padding: 40px 50px;
  display: table;
  border-style: solid;
  border-width: 3px;
  border-color: gray;

#quote-text {
  font-size: 25px;
  height: 150px;
  overflow-y: scroll;

#quote-icon-1 {
  margin-right: 10px;

#quote-icon-2 {
  margin-left: 10px;
#author-box {
  display: flex;
  padding: 0.4em;
  font-size: 20px;
  float: right;

#buttons {
  padding: 0.5em;
  display: inline-block;
  width: 100%;
  margin-top: 0.2em;

#tweet-button {
  float: left;

#new-quote {
  float: right;
  font-weight: bold;

              $(document).ready(function() {
  function quote() {
    var quotes = [
      "A journey of a thousand miles begins with a single step",
      "Every morning we are born again. What we do today is what matters most",
      "A new command I give you: Love one another. As I have loved you, so you must love one another",
      "If your mind is empty, it is always ready for anything, it is open to everything. In the beginner’s mind there are many possibilities, but in the expert’s mind there are few",
      "Happiness is not something ready made. It comes from your own actions"
    var authors = [
      "Lao Tzu",
      "Shunryu Suzuki",
      "Dalai Lama"

    var randomNumber = Math.floor(Math.random() * quotes.length);
    var randomQuote = quotes[randomNumber];
    var randomAuthor = authors[randomNumber];

  $("#new-quote").on("click", function() {
    window.open("https://twitter.com/intent/tweet", "_blank")

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