cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <!-- This style element puts a colored border on 
divs and spans and spaces them out. You will learn
about <style> more in Lessons 2 and 3 of the first 
course in the Nanodegree -->
<style>
  div,span {
    margin : 4px;
    border : 2px solid;
  }
  div {
    border-color:red;
  }
  span {
    border-color : blue;
  }
</style>

<div>
  Example DIV
</div>
<div>
  Example DIV
</div>

<span>
  Example SPAN
</span>
<span>
  Example SPAN
</span>
<span>
  Example SPAN
</span>

<div>another div</div><div>and another in the same line of code</div>

<div>I can even put divs...
  <div>INSIDE of my divs...
    <div>and then put divs inside of those!</div>
  </div>
</div>

<span>The same is true... 
  <span>of spans...
    <span>with spans inside of them</span>
  </span>
</span>


<div>Just how deep can I nest HTML elements? This is level 1
  <div>Level 2
    <div>Level 3
      <div>Level 4
        <div>Level 5
          <div>Level 6
            <div>Level 7
              <div>Level 8
                <div>Level 9
                  <div>Level 10
                    <div>Okay, this is tiring...</div>
                    <div>But I have a question!</div>
                    <div>What do you think would happen</div>
                    <div>If you changed line 7 of this code</div>
                    <div>To say margin: 1px;</div>
                    <div>Try it out!</div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console