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

              
                <!-- Copyright 2020 Google LLC.
SPDX-License-Identifier: Apache-2.0 -->

<!DOCTYPE html>
<html lang="en">

<head>
  <title>Hello!</title>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="/style.css">
</head>

<body>
  <p>
    Click here then try to tab around the links in this document.
  </p>
  <div class="container">
    <div class="card">
      <h2>
        Card One
      </h2>
      <p>
        This is card one in the source of our website.
      </p>
      <div>
        <a href="">Go someplace</a>
      </div>
    </div>
    <div class="card">
      <h2>
        Card Two
      </h2>
      <p>
        This is card two in the source of our website.
      </p>
      <div>
        <a href="">Go someplace</a>
      </div>
    </div>
    <div class="card">
      <h2>
        Card Three
      </h2>
      <p>
        This is card three in the source of our website.
      </p>
      <div>
        <a href="">Go someplace</a>
      </div>
    </div>
    <div class="card">
      <h2>
        Card Four
      </h2>
      <p>
        This is card four in the source of our website.
      </p>
      <div>
        <a href="">Go someplace</a>
      </div>
    </div>
    <div class="card">
      <h2>
        Card Five
      </h2>
      <p>
        This is card five in the source of our website.
      </p>
      <div>
        <a href="">Go someplace</a>
      </div>
    </div>
    <div class="card">
      <h2>
        Card Six
      </h2>
      <p>
        This is card six in the source of our website.
      </p>
      <div>
        <a href="">Go someplace</a>
      </div>
    </div>
    <div class="card">
      <h2>
        Card Seven
      </h2>
      <p>
        This is card seven in the source of our website.
      </p>
      <div>
        <a href="">Go someplace</a>
      </div>
    </div>
    <div class="card">
      <h2>
        Card Eight
      </h2>
      <p>
        This is card eight in the source of our website.
      </p>
      <div>
        <a href="">Go someplace</a>
      </div>
    </div>
    <div class="card">
      <h2>
        Card Nine
      </h2>
      <p>
        This is card nine in the source of our website.
      </p>
      <div>
        <a href="">Go someplace</a>
      </div>
    </div>
    <div class="card">
      <h2>
        Card Ten
      </h2>
      <p>
        This is card ten in the source of our website.
      </p>
      <div>
        <a href="">Go someplace</a>
      </div>
    </div>
    <div class="card">
      <h2>
        Card Eleven
      </h2>
      <p>
        This is card eleven in the source of our website.
      </p>
      <div>
        <a href="">Go someplace</a>
      </div>
    </div>
  </div>
</body>

</html>
              
            
!

CSS

              
                /* Copyright 2018 Google LLC.
SPDX-License-Identifier: Apache-2.0 */

/* CSS files add styling rules to your content */

body {
  font-family: "Benton Sans", "Helvetica Neue", helvetica, arial, sans-serif;
  margin: 2em;
}

.container {
  max-width: 700px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-auto-rows: minmax(100px, auto);
  gap: 20px;
}

.card {
  border: 4px solid #eee;
  border-radius: 0.5em;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.card h2,
.card p {
  padding: 0.3em 0.5em;
  margin: 0;
}

.card a {
  display: block;
  padding: 0.3em 0.5em;
  margin: 0;
  text-decoration: none;
  background-color: #333;
  color: #fff;
}

.card a:focus {
  outline: 4px solid orange;
}

.card:nth-child(1) {
  grid-column: 2;
  grid-row: 1 / 3;
}

.card:nth-child(2) {
  grid-column: 1;
  grid-row: 4 / 6;
}

.card:nth-child(3) {
  grid-column: 3;
  grid-row: 3 / 5;
}

.card:nth-child(4) {
  grid-column: 1;
  grid-row: 1;
}

.card:nth-child(5) {
  grid-column: 2;
  grid-row: 5;
}

.card:nth-child(6) {
  grid-column: 1;
  grid-row: 6;
}

.card:nth-child(7) {
  grid-column: 1;
  grid-row: 2 / 4;
}

.card:nth-child(8) {
  grid-column: 3;
  grid-row: 2;
}

.card:nth-child(9) {
  grid-column: 3;
  grid-row: 5;
}

.card:nth-child(10) {
  grid-column: 3;
  grid-row: 1;
}

.card:nth-child(11) {
  grid-column: 2;
  grid-row: 3 / 5;
}

              
            
!

JS

              
                
              
            
!
999px

Console