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 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.

  <div class="wrapper">
      <h1>A Header is block level</h1>
    <div class="main">
          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)
        <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>
      <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>And here is an image: <img src="https://raw.githubusercontent.com/lisacatalano/block/master/pumpkin.jpg" alt=""> which is also an inline element.</p>
        <span> </span> 
        <em> </em> 
        <strong> </strong> 
        <a href=""> </a>
      <p>&copy; css-snippets.com</p>
              * { 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, 
nav, article, header, footer, 
ul, li, 
  background-color: #ddd;
  margin-bottom: 5px;
  padding: 5px;
/*  width: 70%;*/

li { 
  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;
Loading ..................