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


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.


                <h1 id="main-heading">Random Quote Generator</h1>
<div id="quote-container" class="container">
		<blockquote id="quote" class="blockquote-reverse">
			<p id="the-quote">Excellence is a continuous process and not an accident.</p>
			<footer id="the-author">A.P.J Abdul Kalam</footer>

		<button type="button" id="quote-button" class="btn btn-primary">Quote</button>

		<a href="" class="twitter-share-button" data-text="hi whats up" data-show-count="false" data-size="large" id="tweet">Tweet</a>
		<script async src="" charset="utf-8"></script>



                @import '|Slabo+27px';

body {
	background-image: url("")

#quote-container {
	margin-top: 12%;
	background-color: rgba(250, 235, 188, 0.5);
	/*#faebbc rgba(0,0,0,0.2);*/
	padding: 5px;
	border-radius: 50px 15px;
	border-top: 1px solid #e1cc89;
	border-bottom: 1px solid #e1cc89;

#quote {
	padding: 80px 8px 8px 8px;
	margin: 5px;
	background-image: url("");
	background-position: top left;
	background-repeat: no-repeat;
	text-indent: 23px;
	background-size: contain;

#main-heading {
	text-align: center;

#quote-button {
	margin-bottom: 2px;

	font-family: 'Slabo';
	font-size: 24px;
blockquote	{
	font-family: 'Baloo Tamma';
	font-size: 36px;
	text-align: right;


                $(document).ready(function() {
	console.log('document is ready');

	$("#quote-button").on("click", function() {
		$("#quote-button").html("Next Quote");

		 * The following part of code makes an http request to a quote REST API
		 * and prints the received 	quote on the screen
		var xhr = new XMLHttpRequest();"POST", "", true);
		var responseObj;
		xhr.onreadystatechange = function() { //This is an event-listener
			if (xhr.readyState == 1)
			else if (xhr.readyState == 2)
			else if (xhr.readyState == 3)
			else if (xhr.readyState == 4 && xhr.status == 200) {
				var response = JSON.parse(xhr.responseText);

				$("#tweet").attr("data-text", response["quote"] + " - " + response["author"]);
		xhr.setRequestHeader("X-Mashape-Key", "<>");
		xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xhr.setRequestHeader("Accept", "application/json");