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 class="container">
    <div id="quiz1"></div>
</div>
              
            
!

CSS

              
                .container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: #3b70fc;
}
#quiz1 {
    width: 560px;
    background: #fff;
    padding: 2rem;
    border-radius: 3px;
}
              
            
!

JS

              
                $("#quiz1").dlxQuiz({
    quizData: {
        questions: [
            {
                q:
                    'Look at the following selector: $("div")<br/> What does it select?',
                a: "All div elements",
                options: [
                    "All div elements",
                    "The first div element",
                    'All elements with the class "div"'
                ]
            },
            {
                q: "Which of the following is correct",
                a: "jQuery is a JavaScript Library",
                options: [
                    "jQuery is a JSON Library",
                    "jQuery is a JavaScript Library"
                ]
            },
            {
                q: "jQuery uses CSS selectors to select elements?",
                a: "True",
                options: ["True", "False"]
            },
            {
                q: "Which sign does jQuery use as a shortcut for jQuery?",
                a: "the $ sign",
                options: ["the % sign", "the $ sign", "the ? Sign"]
            },
            {
                q:
                    "Is jQuery a library for client scripting or server scripting?",
                a: "Client scripting",
                options: ["Client scripting", "Server scripting"]
            }
        ]
    }
});

              
            
!
999px

Console