cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

            
              
<body>
  <div class="wrapper">
    <header>
      <h1>A Header is block level</h1>
      
      <nav>
        <ul>
          <li>page1</li>
          <li>page2</li>
          <li>page3</li>
          <li>page4</li>
        </ul>
      </nav>
    </header>
    
    <div class="main">
      <article>        
        <blockquote>
          Block-level elements ... most significant characteristic is that they typically are formatted with a line break before and after the element (thereby creating a stand-alone block of content). That is, they take up the width of their containers. (MDN HTML Reference)
        </blockquote>
        
        <p>Block level elements take up 100% of the width of the parent container. (Unless a width is specified.) They can be assigned width, height, margin and padding. </p>
        
        <p>Block level elements are automatically placed on the next line after the previous block level element. This is the normal document flow when you don't use positioning or floats.</p>
        
        <p></p>
      
      </article>
      <h2>Inline Elments</h2>
      
      <p>Here are some inline elements: 
        <span>This is a span.</span>
      
        <em>This is emphasis.</em>
      
        <strong>This is strong.</strong>
        
        <a href="#">This is an anchor tag (link).</a>
      </p>
      
      <p>And here is an image: <img src="https://raw.githubusercontent.com/lisacatalano/block/master/pumpkin.jpg" alt=""> which is also an inline element.</p>
      
      <p>
        <span> </span> 
        <em> </em> 
        <strong> </strong> 
        <a href=""> </a>
      </p>
    </div>
    
    <footer>
      <p>&copy; css-snippets.com</p>
    </footer>  
    
  
  </div>
</body>
            
          
!
            
              * { margin: 0; padding: 0 }

body { 
  background-color: #eee;
  font-family: sans-serif;
  font-size: .9em; 
}

.wrapper {
  width: 500px;
  background-color: white; 
  margin: 0 auto;
  padding: 1em;
}

/* Block Level elements */
h1, h2, h3, p, 
div, 
nav, article, header, footer, 
ul, li, 
blockquote 
{ 
  background-color: #ddd;
  margin-bottom: 5px;
  padding: 5px;
/*  width: 70%;*/
}

li { 
  display:inline;
  height: 100px;
  width: 200px;
  margin: 0 20px;
  padding: 15px;
  background-color: #fff;
}

blockquote { 
  font-style: italic;
/*  height: 100px;*/
}
footer {
  height: 100px;
}

/* Inline elements */
span, em, strong, a, img, cite {
  background-color: #92CACA; 
  padding: 0px 5px;
  margin: 10px;
/*  height: 50px;*/
/*  width: 30px;*/
  display: block;
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console