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 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

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

              
                <!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<title>Display Property Example</title>
</head>
<body>

	<p id="p1">This is paragraph p1.</p>
	<p class="p2">This is paragraph p2.</p>
	<p class="p3">This is paragraph p3.</p>
	
	<hr />
	
	<div class="ex4">
		<i class="i1">Go</i> <i class="i2">Badgers!</i> <i class="i3">go!</i>
	</div>
	
</body>
</html>
              
            
!

CSS

              
                body {
		font-size: 200%; /* just making the type easier to see */
	}
	
	#p1 {
		background-color: rgba(255, 0, 0, .3);
    color:white;
	}
	
	.p2 {
		background-color: rgba(0, 255, 0, .3);
	}
	
	.p3 {
		background-color: rgba(0, 0, 255, .3);
	}
	

	.i1 {
		background-color: rgba(255, 55, 0, .9);
	}
	
	.i2 {
		background-color: rgba(0, 255, 0, .6);
	}
	
	.i3 {
		background-color: rgba(0, 0, 255, .7);
	}

              
            
!

JS

              
                //Complete this during class, recording your observations with your partner. 



//Look over the HTML and CSS of the example. Describe what you see.
//Use the web inspector to change the display property of the first paragraph to inline. Describe what you see.
//Change the second paragraph to inline. Describe what you see.
//Now change the third. Describe what you see.
//Describe why the paragraphs changed.

//Reload your page!!

//Using the web inspector, add a rule using p as the selector. Set it to display: inline-block. Any change?

//Look at the second section, Go bear, go!. Why is this section displaying in a line?

//Use the web inspector to change the display property of the first i to block. What happened?

//For your assignment mark up in HTML, add a CSS stylesheet and a full head tag with the responsive viewport tag.
//style this example anyway you like - take notice how I used rgba - a is the alpha channel and controls opacity.  play with it!
//Add navigation to three empty links.
//Notice the use of classes used in this example.
//Explain in a new <div> the reason to use IDs and classes.
//Upload to your Week 23 folder.
              
            
!
999px

Console