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.


	<link rel="stylesheet" href=",400,500,700" rel="stylesheet" type="text/css">
<body class='row'>
	<h1 class='display-4 text-center'>
		Random Quote Generator
	<h4 style='padding-bottom: 20px;' class='headline text-center'>
		A tool for combining random images and famous quotes, designed using Google's Material Design Lite. To get a new image, refresh the page.
	<div class='mdl-card mdl-shadow--8dp center-block'>
		<div class='mdl-card__title'>
			<h2 id='author' class='mdl-card__title-text'>Author</h2>
		<div class='mdl-card__supporting-text'>
			<p id='quote'>Quote<p>
		<div class='mdl-card__actions mdl-card--border'>
			<a class='mdl-button mdl-js-button mdl-button--raised mdl-button--accent mdl-js-ripple-effect' onclick='getAnotherQuote();'>
				Get Another Quote
			<a style='float:right;' class='mdl-button mdl-js-button mdl-button--raised mdl-button--colored mdl-js-ripple-effect' onclick='tweet();'>
				Tweet This


                body {
    background: #fafafa;

.mdl-card {
    width: 512px;

.mdl-card__title {
    color: #fff;
    height: 176px;
    background: url('') center / cover;

.demo-card-wide > .mdl-card__menu {
    color: #fff;

.jumbotron {
	background: #fafafa;


                var currQuote, currAuthor;

$(document).ready(function() {

function getAnotherQuote() {
				url: "",
				type: "POST",
				beforeSend: function(xhr) {
						xhr.setRequestHeader("X-Mashape-Key", "hNHlla3Sy4msh2sg72EL9kyGqbVgp1teTk3jsnhkdY08dAPquU");
						xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
						xhr.setRequestHeader("Accept", "application/json");
				dataType: "json"
		}).done(function(data) {
				currQuote = data['quote'];
				currAuthor = data['author'];

function tweet() {
	var replaceSpaces = new RegExp('/s', 'g');
	var quoteNoSpace = currQuote.replace(replaceSpaces, '%20');
	var url = ''+ quoteNoSpace + '%20-%20' + currAuthor + '&url=none';, '_blank');