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

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

              
                <h1><span class="highlight">Pablo Neruda</span> Facts</h1>

<figure>
  <img src="https://www.nobelprize.org/images/neruda-13228-portrait-medium.jpg" alt="Pablo Neruda" />
  <figcaption>
    <p>Pablo Neruda, original name Neftalí Ricardo Reyes Basoalto, (born July 12, 1904, Parral, Chile &mdash; died September 23, 1973, Santiago), Chilean poet, diplomat, and politician who was awarded the Nobel Prize for Literature in 1971. He was perhaps the most important Latin American poet of the 20th century.</p>
  </figcaption>
</figure>

              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Hepta+Slab:wght@1..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,200..900;1,200..900&display=swap');

:root {
  --default-body-font: 'Crimson Pro', serif;
  --default-body-weight: 400;
  --default-body-font-size: 1rem;
  --default-body-line-height: 1.2;
  --default-heading-font: 'Hepta Slab', serif;
}

body {
  background-color: rgba(241, 233, 210, .45);
  box-sizing: border-box;
  color: #224;
  font-family: var(--default-body-font);
  font-size: 1.3em;
  font-weight: var(--default-body-weight);
  line-height: var(--default-body-line-height);
  padding: 2em;}

*, *:before, *:after {
    box-sizing: inherit;
}

h1 {
  font-family: var(--default-heading-font);
  font-size: 3rem;
}

h2 {
  font-family: var(--default-heading-font);
  font-weight: 300;
  font-size: 2rem;
}

.highlight {
/*   color: #cea152; */
  color: rgb(169, 13, 94);
}

figure {
  display: flex;
  flex-flow: row-reverse;
  justify-content: flex-end;
}

img {
  width: 30vw;
}
  
figcaption {
  align-self: flex-end;
  border-right: 1em solid rgb(169, 13, 94);
  font-size: 75%;
  padding-right: 1em;
  margin-right: 2em;
  width: 25vw;
}

              
            
!

JS

              
                
              
            
!
999px

Console