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

              
                <!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Squares and Rectangles</title>
    <link rel="stylesheet" href="./resources/CSS/Squares&Rectangles.css">
  </head>
  <body>
    <h1>Squares and Rectangles</h1>
    <div class="box-container">
      <h2>Colors cOlors coLors colOrs coloRs</h2>
      <div class="color box">
        <div class="color-panel red-hot">
          <p class="color-label">Red Hot</p>
          <p class="color-hex">Ouch!!!!!</p>
        </div>
        <div class="color-panel slime-lime">
          <p class="color-label">Slime Lime</p>
          <p class="color-hex">Stickyyyyy</p>
        </div>
        <div class="color-panel yellow-mellow">
          <p class="color-label">Yellow Mellow</p>
          <p class="color-hex">Ice cream.. Hello</p>
        </div>
        <div class="color-panel brown">
          <p class="color-label">Brown</p>
          <p class="color-hex">...</p>
        </div>
      </div>
    </div>
    <div class="box-container">
      <h2>Fonts</h2>
      <div class="font box">
        <div class="font-panel">
          <p class="font-label roboto-mono">Roboto Mono</p>
          <p class="regular roboto-mono">Hello Monkey, how was your day?</p>
          <p class="bold roboto-mono">Hello Monkey, how was your day?</p>
          <p class="italic roboto-mono">Hello Monkey, how was your day?</p>
        </div>
        <div class="font-panel">
          <p class="font-label quicksand">Quicksand</p>
          <p class="regular quicksand">Hello Monkey, how was your day?</p>
          <p class="bold quicksand">Hello Monkey, how was your day?</p>
          <p class="italic quicksand">Hello Monkey, how was your day?</p>
        </div>
        <div class="font-panel">
          <p class="font-label nunito">Nunito</p>
          <p class="regular nunito">Hello Monkey, how was your day?</p>
          <p class="bold nunito">Hello Monkey, how was your day?</p>
          <p class="italic nunito">Hello Monkey, how was your day?</p>
        </div>
      </div>
    </div>
    <div class="box-container">
      <h2> Text Styles </h2>
      <div class="text-container">
        <div class="text-panel">
          <h1>H1: Main page heading</h1>
          <ul>
            <li>
              "Font-weight: 700 (bold)"
            </li>
            <li>
              "Font-size: 26px"
            </li>
            <li>
               "Font-family: Nunito Sans"
            </li>
          </ul>
        </div>
        <div class="text-panel">
          <h2>H2: Subheading</h2>
          <ul>
            <li>
              "Font-weight: 500 (bold)"
            </li>
            <li>
              "Font-size: 18px"
            </li>
            <li>
               "Font-family: Poppins"
            </li>
          </ul>
        </div>
        <div class="text-panel">
          <h1>P: Paragraph text</h1>
          <ul>
            <li>
              "Font-weight: 400 (bold)"
            </li>
            <li>
              "Font-size: 14px"
            </li>
            <li>
               "Font-family: Poppins"
            </li>
          </ul>
        </div>
      </div>
    </div>
  </body>
</html>
              
            
!

CSS

              
                h1 {
  font-family: "Helvetica";
  text-align: center;
  font-weight: 800;
  
  text-shadow: 4px 3px 0px #fff, 
               0px 7px 4px rgba(0,0,0,0.3);
  letter-spacing: 0.4em;
  background-image: url("https://i0.wp.com/allthingsfadra.com/wp-content/uploads/2013/10/Toy-Story-cloud-wallpaper.jpg?ssl=1");
  background-repeat: no-repeat;
  background-size: 1600px 400px; /* 100%; */
  padding: 100px;
}

.box-container {
  border: 5px solid pink;
  padding: 10px;
  margin: 10px auto;
}

h2 {
  text-align: center;
  color: violet, indigo, blue, green, yellow, orange, red;
  background-image: linear-gradient(to left, violet, indigo, blue, green, yellow, orange, red); 
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent;
}

.color-panel {
  margin: 20px auto;
  display: inline-block;
  width: 24.43%;
  text-align: center;
  min-height: 100px;
}

.red-hot {
  font-family: "Arial";
  background-color: red;
  color: white;
}

.slime-lime {
  font-family: "Arial";
  background-color: limegreen;
  color: black;
}

.yellow-mellow {
  font-family: "Arial";
  background-color: yellow;
  color: black;
}

.brown {
  font-family: "Arial";
  background-color: brown;
  color: white;
}

.font-panel {
  
}

.font-label {
  text-decoration: underline;
  font-size: 30px;
}

.regular {
  font-style: normal;
}

.bold {
  font-weight: 800;
}

.italic {
  font-style: italic;
}

.roboto-mono {
  font-family: "Roboto Mono", monospace;
  color: red;
}

.quicksand {
  font-family: "Quicksand", "Helvatica";
  color: violet;
}

.nunito {
  font-family: "Nunito", "Arial";
  color: blue;
}
              
            
!

JS

              
                
              
            
!
999px

Console