Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <div class="main">
  <div>
    <h1>Recipes Shmecipes</h1>
    <h2>Mary Berrys, Banana Bread</h2>
    <p>A warming banana loaf recipe, made using the ripest bananas. This deliciously moist loaf cake, best served in thick slices, is one of Mary Berry's most popular recipes.</p>
  </div>
  <img src="https://i.pinimg.com/564x/a5/f0/2b/a5f02b5d0feacbd33d382bd979ac92ea.jpg" alt="yummy">
  <div>
    <h3>Intro</h3>
    <p>This is a lovely, moist loaf, which really doesn’t need to be buttered. It freezes extremely well. Any bananas left in the fruit bowl are ideal for this cake - the riper they are, the better.</p>
    <ul>
      <li>Level: <span>Easy</span></li>
      <li>Prep Time: <span>15min</span></li>
      <li>Cook Time: <span>1hr</span></li>
      <li>Total time: <span>1.15hr</span></li>
    </ul>
  </div>
  <div class="table">
    <h3>Ingredients</h3>
    <div>
      <p>100g</p>
      <p>butter, softend</p>
    </div>
    <div>
      <p>175g</p>
      <p>caster sugar</p>
    </div>
    <div>
      <p>2</p>
      <p>eggs</p>
    </div>
    <div>
      <p>2</p>
      <p>ripe bananas, mashed</p>
    </div>
    <div>
      <p>1 tsp</p>
      <p>baking powder</p>
    </div>
    <div>
      <p>2</p>
      <p>ripe bananas, mashed</p>
    </div>
  </div>
  <div>
    <h3>Essential Kit</h3>
    <p>You will need a 900g (2lb) loaf tin, 17 x 9 x 9cm (6½ x 3½ x 3½in) base measurement.</p>
  </div>
  <div>
    <h3>Instructions</h3>
    <p>Lightly grease the loaf tin and line it with non-stick baking parchment. Pre-heat the oven to 180°C/350°F/Gas Mark 4. Measure all the ingredients into a mixing bowl and beat for about 2 minutes, until well blended; an electric mixer is best for this but of course you can also beat by hand with a wooden spoon.</p>
    <p>Spoon the mixture into the prepared tin and level the surface. Bake for about 1 hour, until well risen and golden brown. A fine skewer inserted in the centre of the cake should come out clean.</p>
    <p>Leave the cake to cool in the tin for a few minutes, then loosen with a small palette knife and turn the cake out. Remove the lining paper and leave on a wire rack to cool completely. Slice thickly to serve.</p>
  </div>
</div>
              
            
!

CSS

              
                :root {
  --ff-header: "Shrikhand";
  --ff-body: "K2D";
  
  --c-primary: #FFFFFF;
  --c-secondary: #BF4B34;
  --c-tertiary: #1D3453;
  --c-table: #FFDD79;
  --c-bullet: #FBAC4D;
  
  --base-gutter: 30px;
  --base-radius: 6px;
  
}

* {
  margin: 0;
  padding: 0;
  margin: auto; 
}

html {
  background-color: var(--c-primary);
}

body {
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-tertiary);
}

.main {
  max-width: 700px;
  width: 90%;
  margin: var(--base-gutter) auto;
}

h1 {
  font-family: var(--ff-header);
  font-size: 8vmin;
  color: var(--c-secondary);
  line-height: 1;
}

h2 {
  margin-bottom: calc(var(--base-gutter) / 2);
}

h3 {
  color: var(--c-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 14px;
  margin-top: var(--base-gutter);
  margin-bottom: calc(var(--base-gutter) / 4);
}

ul,
img,
p {
  margin-bottom: var(--base-gutter);
}

ul {
  list-style: none;
  line-height: 2;
}

li {
  padding-left: 5px;
}

li:before {
  position: relative;
  top: 5px;
  left: -5px;
  content: "* ";
  color: var(--c-bullet);
}

img {
  border-radius: var(--base-radius);
  width: 100%;
  height: auto;
}

.table {
  margin-bottom: var(--base-gutter);
  max-width: 350px;
  width: 100%;
  display: inline-block;
}

.table div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--base-gutter) / 2 );
  background: var(--c-table);
}

.table div:nth-child(odd) {
  background: rgba(255, 221, 121, 0.8);
}

.table div:first-of-type {
  border-radius: var(--base-radius) var(--base-radius) 0 0;
}

.table div:last-of-type {
  border-radius: 0 0 var(--base-radius) var(--base-radius);
}

.table p {
  width: 100%;
  order: 1;
  text-align: right;
  margin-bottom: 0;
}

.table p:last-of-type {
  text-align: left;
  order: 0;
}
              
            
!

JS

              
                
              
            
!
999px

Console