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

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


                <h3>All the same width, 200px</h3>
<div class="wrapper">
  <div class="insta width">Instagram - 1:1</div>
  <div class="widescreen width">Widescreen - 16:9</div>
  <div class="tv width">Old School TV - 4:3</div>
  <div class="phone width">iPhone 12 - 9:19.5</div>
  <div class="phonel width">iPhone 12 - 19.5:9</div>
<h3>All the same height, 200px</h3>
<div class="wrapper">
  <div class="insta height">Instagram - 1:1</div>
  <div class="widescreen height">Widescreen - 16:9</div>
  <div class="tv height">Old School TV - 4:3</div>
  <div class="phone height">iPhone 12 - 9:19.5</div>
  <div class="phonel height">iPhone 12 - 19.5:9</div>
<h3>All the same width and height, 200px x 200px</h3>
<div class="wrapper">
  <div class="insta height width">Instagram - 1:1</div>
  <div class="widescreen height width">Widescreen - 16:9</div>
  <div class="tv height width">Old School TV - 4:3</div>
  <div class="phone height width">iPhone 12 - 9:19.5</div>
  <div class="phonel height width">iPhone 12 - 19.5:9</div>


                * {
  font-family: arial;
  text-align: center;

div {
  border: solid #333 1px;
  background-color: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px;

.wrapper {
  background-color: transparent;
  border: 0;

.insta {
  aspect-ratio: 1/1;
.widescreen {
  aspect-ratio: 16/9;
.tv {
  aspect-ratio: 4/3;
.phone {
  aspect-ratio: 9/19.5;
.phonel {
  aspect-ratio: 19.5/9;

.width {
  width: 200px
.height {
  height: 200px