Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                
              
            
!

CSS

              
                
              
            
!

JS

              
                //1. Create a function that stores a prompt in a variable. Give the prompt the text "Full Name". Next, the function should print "Welcome ", with the prompt variable added, to the console. Set it to run after 10 seconds using setTimeout. After you have set it, the prompt should pop up once after 10 seconds. If you enter your full name into it, it should print out "Welcome " and then your name. 

//2. Make a color changing div! (We will learn more about this later!) First, make a div in HTML. This is a reminder:
// <div> Then, whatever text you want goes before the closing tag </div>

//Once you've set your color, move to JavaScript. There, access your div by storing it in a variable (we will learn how to do this soon, but for now you can uncomment the code below). 
//let myColorDiv = document.querySelector("div")

//Now, in CSS, set the color property of the text by accessing the div, like this:

/*

  div {
    color: blue
  }

*/

//Once you've set your color, move to JavaScript. There, access your div by storing it in a variable (we will learn how to do this soon, but for now you can uncomment the code below). 
//let myColorDiv = document.querySelector("div")

//Now, make a function called colorChange. In your function, make an if statement that checks if your variable myColorDiv.style.color is equal to the color you assigned in CSS, so, for example:
//if (myColorDiv.style.color == "blue")
//If it is, change the color (using style.color) to a different color. If not (as in, in your else statement), change the color back to your original color. 

//Next, make a setInterval that triggers the function to run! Experiment with different numbers of milliseconds, to find a color changing speed that you like! Try 500 milliseconds to start.



              
            
!
999px

Console