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


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


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.

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.


                <section class="paper">
  <h1>Terms and conditions</h1>
    <li>Software: a digital product</li>
    <li>Acceptance: By using the Website or Services in any manner, you are bound by these Terms of Service, as well as the Incorporated Terms identified below (collectively, the “Terms”).</li>
  <ol id="conditions">
    <li>Distribution: You will not distribute your license</li>
    <li>Authentication: You will not share your account</li>
    <li>You will follow <a href="" target="_blank">Eddy Vinck</a> on Twitter if you found this helpful. 🐦</li>
  <h2>Add a new rule</h2>
    <input name="rule" id="rule" type="text" placeholder="add a rule" value="">
    <button type="submit">Add rule</button>

<div class="twitter">
  <a href="" target="_blank">Follow Eddy on Twitter</a>

<!-- <div class="simple-example">
  <h1>Simple example</h1>
  <h2>First section</h2>
  <p>Some really interesting content</p>
  <h2>Second section</h2>
  <p>Some really interesting content</p>
</div> -->


                section {
  counter-reset: heading;
section h2 {
  counter-increment: heading;
section h2::before {
  content: counter(heading)". ";
ol {
  padding-left: 0;
  counter-reset: ruleNumber;
  list-style: none;
ol li {
  counter-increment: ruleNumber;
  position: relative;
  padding-left: 40px;
ol li::before {
  position: absolute;
  left: 0;
  content: counter(heading)"."counter(ruleNumber)".";

/* to make it pretty */
* {
  box-sizing: border-box;
:root {
  --custom-blue: #2730B3;
body {
  background: #1E0861;
h1 {
  text-align: center;
a {
  color: var(--custom-blue);
  text-decoration: none;
  font-weight: 700;
.paper {
  font-family: sans-serif;
  border-radius: 5px;
  margin: 60px auto;
  background: #f7f7f7;
  padding: 40px 40px 80px;
  width: 80%;
  max-width: 100%;
  min-width: 300px;
  box-shadow: 0px 5px 25px 5px rgba(39, 48, 179, 1);
form {
  display: flex;
input {
  padding: 10px;
button {
  padding: 10px;
  background: var(--custom-blue);
  color: white;
  font-weight: 700;
  border-color: var(--custom-blue);

.twitter a {
  max-width: 50%;
  min-width: 300px;
  margin: 0 auto;
  font-family: sans-serif;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(29, 161, 242);
  border-radius: 9999px;
  padding: 0 30px;
  min-height: 49px;
  transition: 0.15s ease-in-out;
.twitter a:hover {
  background: #1A91DA;

.simple-example {
  margin-top: 160px;
  padding: 40px;
  background: white;
  text-align-last: left;
  counter-reset: sectionCount; 
.simple-example h2 { 
  counter-increment: sectionCount; 
.simple-example h2::before { 
  content: counter(sectionCount)". "; 



                const form = document.querySelector('form');
const conditions = document.getElementById('conditions');

form.addEventListener('submit', (event) => {
  const li = document.createElement('li');
  const formData = new FormData(form);
  const [rule] = formData.values();
  li.innerText = rule || "empty rule";