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.

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.

HTML

              
                <div id="simple-counter">
    <h3>Introduction</h3>
    <h3>Body</h3>
    <h3>Conclusion</h3>
</div>
<hr>

<div id="nested-counter">
    <ol>
        <li>item</li>
        <!-- 1     -->
        <li>item
            <!-- 2     -->
            <ol>
                <li>item</li>
                <!-- 2.1   -->
                <li>item</li>
                <!-- 2.2   -->
                <li>item
                    <!-- 2.3   -->
                    <ol>
                        <li>item</li>
                        <!-- 2.3.1 -->
                        <li>item</li>
                        <!-- 2.3.2 -->
                    </ol>
                    <ol>
                        <li>item</li>
                        <!-- 2.3.1 -->
                        <li>item</li>
                        <!-- 2.3.2 -->
                        <li>item</li>
                        <!-- 2.3.3 -->
                    </ol>
                </li>
                <li>item</li>
                <!-- 2.4   -->
            </ol>
        </li>
        <li>item</li>
        <!-- 3     -->
        <li>item</li>
        <!-- 4     -->
    </ol>
    <ol>
        <li>item</li>
        <!-- 1     -->
        <li>item</li>
        <!-- 2     -->
    </ol>
</div>
<hr>
<div id="custom-counter">
    <ol>
        <li>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quaerat, excepturi!</li>
        <li>Lorem ipsum dolor sit amet consectetur adipisicing elit. Repellat provident impedit id? Enim nihil aperiam modi? Laudantium vel maiores consequatur?</li>
        <li>Lorem ipsum dolor sit amet consectetur adipisicing elit. Officiis illum natus impedit non ea animi?</li>
        <li>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Maxime consequuntur ea doloremque voluptatum, temporibus optio quis. Adipisci libero numquam laboriosam.</li>
        <li>Lorem ipsum dolor sit amet consectetur adipisicing elit. Enim, magnam!.</li>
        <li>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Pariatur, qui?</li>
        <li>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Dolorem cum consectetur qui enim optio delectus.</li>
    </ol>

</div>
              
            
!

CSS

              
                #simple-counter {
    counter-reset: section; /* Set a counter named 'section', and it`s initial value is 0. */
    h3::before {
        counter-increment: section; /* Increment the value of section counter by 1 */
        content: counter(section) " "; /* Display the value of section counter */
    }
}

#nested-counter {
    ol {
        counter-reset: nested; /* Creates a new instance of the
                                                nested counter with each ol
                                                element */
        list-style-type: none;
    }

    li::before {
        counter-increment: nested; /* Increments only this instance
                                                of the nested counter */
        content: counters(nested, ".") " "; /* Combines the values of all instances
                                                of the nested counter, separated
                                                by a period */
    }
}

#custom-counter {
    ol {
        counter-reset: list;
        list-style: none;
    }

    ol li {
        position: relative;
        padding-left: 40px;
    }

    ol li::before {
        position: absolute;
        left: 0;
        counter-increment: list;
        content: counter(list, upper-roman)".";
    }
}

              
            
!

JS

              
                
              
            
!
999px

Console