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

              
                ///////////////////////Exercises /////////////////////////
// 1. Declare the variables x, y, and z, and set them equal to 13, 27, and 94

// 2. Print the sum of all three variables to the console, and using your knowledge of string concatenation, print the statement "The sum of x, y, and z is ", followed by the sum, all on one line.

// 3. Write the difference between z and y, divided by x to the webpage in the format "The difference between z and y, divided by x is _____" where the blank is the value.

// 4. Declare a new variable named 'age' and set it equal to your age. Increment this variable by 1 on the next line, and on a third line, print the variable to the console. 

// 5. Print the age variable to the console in this format: "In one year I will be ___" where the blank is the value of your age.

//////////////Extra Exercises: 

//1. Create a variable and set it equal to a number of your choice. Create another variable and set it equal to another number of your choice. 

//2. Calculate the first variable multiplied by the second variable, and print the answer to the console. 

//3. Below that, calculate the first variable divided by the second variable, and print it to the console. 

//4. Calculate the fist variable multiplied by (the second variable divided by the first variable) and print it to the console. 

//5. Print the second variable with increment to the console.  
              
            
!
999px

Console