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. In HTML, create two headers and two paragraphs. Give them all their own id. 
//2. In JavaScript, store each of your elements in a variable. Use getElementById for the headers, and getElementByTagName for the paragraphs. 
//3. Using innerHTML, set some text for each element. 
//4. Using style.color, set a text color for each element. 
//5. Access the body of the webpage in JavaScript, and set the background color. 

////////////Extra Exercises:
//1. Create a function that changes the text of a header when the header is clicked on!
//First, make a header in HTML and give it an id and an onclick. Give it some text. 
//Next, make a function in JavaScript with the same name as the onclick. Iside the function, store your header as a variable (using document.getElementbyId()) and set the innerHTML to something new. 
//Now, click on your header! The text should change!

              
            
!
999px

Console