Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

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


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

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.


                <!DOCTYPE html>
        <link href="" rel="stylesheet"> 
        <link href="styles.css" type="text/css" rel="stylesheet" />
        <meta charset="utf-8">
        <title>jQuery Selectors Testing</title>
        <header>jQuery Selector Testing</header>
        <section id="section1" class="testClass">
            Boop dee-wop bobaadop-dop doop!
        <section id="section2" class="testClass">
        <section id="section3" class="testClass">
            Wee-bee-ba-dop! Doop dee-wop!
        <button id="idButton">jQuery ID method</button>
        <button id="classButton">jQuery Class method</button>
        <button onclick="changeClass()">JavaScript class method</button>
        <button onclick="changeId()">JavaScript ID method</button>

    <script src=""></script> 


        // jQuery ID selector: pick a thing, do a thing.
        $('#idButton').click(function() {
            $('#section1').css('color', 'blue');

        //jQuery class selector. Pick multiple things, do one thing all at once. PRETTY COOL.
        $('#classButton').click(function() {
            $('.testClass').css('color', 'red');

        // JavaScript Class selector. Pick a class name, save it to something, loop over that something, and do things.
        function changeClass() {
            let coolClasses = document.getElementsByClassName('testClass');
            for (let i = 0; i < coolClasses.length; i++) {
                coolClasses[i].style.color = 'green';

        // JavaScript ID selector. Pick an ID, do a thing. If you use the same ID more than once; first, re-evelaute your decisions; second, watch only the first thing change.
        function changeId() {
            let coolID = document.getElementById('section2').style.color = 'purple';




                header {
    font-size: 22px;
    margin-bottom: 1vw;

* {
    font-family: roboto, arial, sans-serif;

section {
    line-height: 2vw;

#testButton {
    margin-top: 2vw;