Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <base href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/">
<main>
<img src="bikes-1x.jpg" srcset="bikes-1x.jpg 1x, bikes-2x.jpg 2x, bikes-3x.jpg 3x" alt="">

<h1>Bicycle Race</h1>
<h2>Lyrics by Freddie Mercury</h2>

<p><pre>
Bicycle bicycle bicycle
I want to ride my bicycle bicycle bicycle
I want to ride my bicycle
I want to ride my bike
I want to ride my bicycle
I want to ride it where I like
</pre></p>

<p><pre>
You say black I say white
You say bark I say bite
You say shark I say hey man
Jaws was never my scene
And I don't like Star Wars
</pre></p>

<p><pre>
You say Rolls I say Royce
You say God give me a choice
You say Lord I say Christ
I don't believe in Peter Pan
Frankenstein or Superman
All I wanna do is
</pre></p>

<p><pre>
Bicycle bicycle bicycle
I want to ride my bicycle bicycle bicycle
I want to ride my bicycle
I want to ride my bike
I want to ride my bicycle
I want to ride my bicycle races are coming your way
</pre></p>

<cite>Photograph by <a href="https://www.flickr.com/photos/wiiiiktor/6872867588">Victor Dobai</a>, used under a <a href="https://creativecommons.org/licenses/by-nc/2.0/">Creative Commons Attribution-NonCommercial 2.0 Generic license</a>. 
</main>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700');

:root {
		--standardPadding: 3rem;
}
* {
	box-sizing: border-box;
}
body {
	font-family: PT Sans Narrow, sans-serif;
	margin: 0;
	background: #333;
}
main {
	background: #ffe;
	max-width: 38rem;
	width: 80%;
	margin: 0 auto;
	padding-left: var(--standardPadding);
	padding-right: var(--standardPadding);
	padding-bottom: 4rem;
}
main img {
	width: calc(100% + (2 * var(--standardPadding)));
	margin-left: calc(-1 * var(--standardPadding));
}
h2 {
	font-weight: 400;
}
pre {
	font-family: inherit;
	font-size: 1.3rem;
}
              
            
!

JS

              
                
              
            
!
999px

Console