Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <div>
  <p>
    <img src="https://assets.codepen.io/2729/WeThe15-vids_01.jpg" alt="Video from 2020 Tokyo Paralympics Twitter account with no captions."><br>
    <a href="https://twitter.com/Tokyo2020/status/1430154916908003338">Video</a>.
  </p>
  <p>
    <span>Stylized X-ray of a human skull with a tiny brain floating loosely in the middle.</span>
  </p>
  <p>
    <img src="https://assets.codepen.io/2729/WeThe15-vids_02.jpg" alt="The same video but from WeThe15 for the 2020 Tokyo Paralympics, this one with captions."><br>
    <a href="https://twitter.com/WeThe15/status/1428114487584849925">Video with captions</a>.
  </p>
  <p>
    <span>A human head illustration, transparent and showing a brain littered with small glowing patches of light.</span>
  </p>
  <p>
    <img src="https://assets.codepen.io/2729/WeThe15-vids_03.jpg" alt="The same video also from WeThe15 for the 2020 Tokyo Paralympics, but this has a sign language interpretor in addition to captions."><br>
    <a href="https://twitter.com/WeThe15/status/1429057260509007883">Video with captions and signing</a>.
  </p>
  <p>
    <span>The same human head, but now the brain is glowing, bright in the middle and making the surface translucent.</span>
  </p>
  <p>
    <img src="https://artnewsglobal.com/wp-content/uploads/2021/08/facebook-vr-workrooms.jpg" alt="Virtual meeting with legless avatars seated around a conference table and gesturing at one another, from Facebook Workrooms."><br>
    Directly into your mind<br>so you can never flee.
  </p>
  <p>
    <span>The brain is now glowing so brightly that it is projecting rays of light through and past the skull, little balls of light as nodes on the beams into the expanse.</span>
  </p>
</div>
              
            
!

CSS

              
                body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.2;
  margin: 0;
  background-color: #000;
  color: #fff;
}

* {
  box-sizing: border-box;
}

div {
  display: grid;
  grid-template-columns: 49vw 49vw;
  grid-template-rows: 34.5vw 34.5vw 34.5vw 34.5vw;
}

p {
  margin: 0;
  border: 0.2vw solid #000;
  border-top-width: 0.4vw;
  border-bottom-width: 0.4vw;
}

p:nth-child(odd) {
  color: #000;
  background-color: #fff;
  padding: 1vw 1.5vw;
/*   font-size: 4.4vw; */
  font-size: 2.4vw;
  overflow: hidden;
}

p:nth-child(odd) img {
  max-width: 100%;
}

p:nth-child(even) {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

p:nth-child(even) span {
  position: absolute;
  top: auto;
  overflow: hidden;
  clip: rect(1px 1px 1px 1px); /* IE 6/7 */
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  white-space: nowrap;
}

p:nth-child(2) {
  background-image: url("https://assets.codepen.io/2729/meme_galaxy-brain_01.png");
}

p:nth-child(4) {
  background-image: url("https://assets.codepen.io/2729/meme_galaxy-brain_02.png");
}

p:nth-child(6) {
  background-image: url("https://assets.codepen.io/2729/meme_galaxy-brain_03.png");
}

p:nth-child(8) {
  background-image: url("https://assets.codepen.io/2729/meme_galaxy-brain_04.png");
}

              
            
!

JS

              
                
              
            
!
999px

Console