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.

  <title>Random LGBT Quote Generator</title>
  <link href="https://fonts.googleapis.com/css?family=Raleway" type="text/css" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css?family=Dawning of a New Day" type="text/css" rel="stylesheet">
  <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.css">

  <section class="container">
    <h1>Random LGBT Quote Generator</h1>
    <div class="quote">
    <div class="name">
    <div class="buttons">
      <button class="btn btn-primary" id="new">
        New quote
      <button class="btn btn-primary" id="tweet">
        <i class="fa fa-twitter"></i>
        Tweet this quote
              body {
  background-color: #9966FF;

.container {
  background-color: white;
  border-radius: 50px;
  text-align: center;
  padding: 20px 0;
  margin: 50px 150px;

h1 {
  font-family: "Raleway";
  color: #9966FF;
  font-weight: bold;
  font-size: 50px;

.quote {
  font-family: "Raleway";

.quote, .name {
  color: #9966FF;
  padding: 0 150px;
  font-size: 30px;

.name {
  font-family: "Dawning of a New Day"

button {
  font-family: "Raleway";
  color: white;
  font-size: 20px;
  border-radius: 5px;
  background-color: #9966FF;
  border: none;
  margin: 20px 0px 20px 20px;
              $(document).ready(function() {
  var quoteArray = ["\"Openness may not completely disarm prejudice, but it's a good place to start.\"",

  "\"When all Americans are treated as equal, no matter who they are or whom they love, we are all more free.\"",
  "\"The only queer people are those who don't love anybody.\"",
  "\"This world would be a whole lot better if we just made an effort to be less horrible to one another.\"",

  "\"Why is it that, as a culture, we are more comfortable seeing two men holding guns than holding hands?\"",

  "\"I hate the word homophobia. It's not a phobia. You're not scared. You're an asshole.\"",

  "\"I believe that no one should ever have to choose between a career we love and living our lives with authenticity and integrity.\"",

  "\"It takes some intelligence and insight to figure out you're gay and then a tremendous amount of balls to live it and live it proudly.\"",

  "\"Every gay and lesbian person who has been lucky enough to survive the turmoil of growing up is a survivor. Survivors always have an obligation to those who will face the same challenges.\"",

  "\"All of us who are openly gay are living and writing the history of our movement. We are no more - and no less - heroic than the suffragists and abolitionists of the 19th century; and the labor organizers, Freedom Riders, Stonewall demonstrators, and environmentalists of the 20th century. We are ordinary people, living our lives, and trying as civil-rights activist Dorothy Cotton said, to 'fix what ain't right' in our society.\"",
  "\"I'm living by example by continuing on with my career and having a full, rich life, and I am incidentally gay.\"",
  "\"I think being gay is a blessing, and it's something I am thankful for every single day.\"",
  "\"Never be bullied into silence. Never allow yourself to be made a victim. Accept no one's definition of your life; define yourself.\"",
  "\"The beauty of standing up for your rights is others see you standing and stand up as well.\"",
  "\"I've been embraced by a new community. That's what happens when you're finally honest about who you are; you find others like you.\"",
  "\"Somebody, your father or mine, should have told us that not many people have ever died of love. But multitudes have perished, and are perishing every hour - and in the oddest places! - for the lack of it.\"",
  "\"We should indeed keep calm in the face of difference, and live our lives in a state of inclusion and wonder at the diversity of humanity.\""];
  var names = [" - Jason Collins", " - Barack Obama", " - Rita Mae Brown", " - Ellen Page", " - Ernest J. Gaines", " - Morgan Freeman", " - Selisse Berry", " - Jason Bateman", " - Bob Paris", " - Tammy Baldwin", " - Portia DeRossi", " - Anderson Cooper", " - Harvey Fierstein", " - Cassandra Duffy", " - Chaz Bono", " - James Baldwin", " - George Takei"];
  var randomNumber = Math.floor(Math.random() * quoteArray.length);
  var colors = ["#990033", "#FF6600", "#FFCC00", "#009900", "#0066FF", "#9933FF"];

  var color = 0;
  var generateQuote = function() {
    randomNumber = Math.floor(Math.random() * quoteArray.length);
    var quote = quoteArray[randomNumber] + names[randomNumber];
    if(color < 6) {
      $("body, button").css("background-color", colors[color]);
      $("h1, .quote, .name").css("color", colors[color]);
    else {
      color = 0;
      $("body, button").css("background-color", colors[color]);
      $("h1, .quote, .name").css("color", colors[color]);
      color ++;

  $("#new").click(function() {
  $("#tweet").click(function() {
    window.open("https://twitter.com/intent/tweet?hashtags=quotes&related=freecodecamp&text='" + encodeURIComponent(quoteArray[randomNumber] + names[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.
Loading ..................