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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <body>
		<nav id="navbar">
			<img id="navlogo"
				src="https://images.unsplash.com/photo-1567446537708-ac4aa75c9c28?ixid=MnwxMjA3fDB8MHxzZWFyY2h8NXx8bG9nb3xlbnwwfHwwfHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=400&q=60"
				alt="">
			<ul>
				<li><a href="#home">Home</a></li>
				<li><a href="#about">About</a></li>
				<li><a href="#contact">Contact</a></li>
				<li><a href="#logout">Logout</a></li>
			</ul>
		</nav>

		<main>
			<h1>My Blog</h1>
			<p>This is my blog. Blah Blah Blah.</p>
			<h2>Recent Posts</h2>
			<div class="post">
				<h2>Learn CSS Selectors</h2>
				<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Officiis, non. A sequi
					accusamus consectetur voluptatum, itaque delectus sunt perferendis molestias
					dolorum
					quaerat id vitae adipisci. Repellendus quia praesentium pariatur consectetur.
				</p>
				<span><a href="https://hashode.com">Read More on Hashnode</a></span>
				<button><span>&hearts;</span></button>
			</div>
			<div class="post">
				<h2>Learn JavaScript Variables </h2>
				<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Officiis, non. A sequi
					accusamus consectetur voluptatum, itaque delectus sunt perferendis molestias
					dolorum
					quaerat id vitae adipisci. Repellendus quia praesentium pariatur consectetur.
				</p>
				<span><a href="https://hashode.com">Read More on Hashnode</a></span>
				<button><span>&hearts;</span></button>
			</div>
			<div class="post">
				<h2>Learn React and Hooks</h2>
				<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Officiis, non. A sequi
					accusamus consectetur voluptatum, itaque delectus sunt perferendis molestias
					dolorum
					quaerat id vitae adipisci. Repellendus quia praesentium pariatur consectetur.
				</p>
				<span><a href="https://hashode.com">Read More on Hashnode</a></span>
				<button><span>&hearts;</span></button>
			</div>
			<div class="post">
				<h2>Learn Python </h2>
				<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Officiis, non. A sequi
					accusamus consectetur voluptatum, itaque delectus sunt perferendis molestias
					dolorum
					quaerat id vitae adipisci. Repellendus quia praesentium pariatur consectetur.
				</p>
				<span><a href="https://hashode.com">Read More on Hashnode</a></span>
				<button><span>&hearts;</span></button>
			</div>
		</main>

		<footer>
			<ul>
				<li>Copyright something something</li>
				<li>April 2021</li>
				<li>
					Social Links
					<ul>
						<li><a href="www.facebook.com">Facebook</a></li>
						<li><a href="www.instagram.com">Instagram</a></li>
						<li><a href="www.youtube.com">Youtube</a></li>
					</ul>
				</li>
			</ul>
		</footer>

	</body>

              
            
!

CSS

              
                * {
	box-sizing: border-box;
}

  body {  /*DON'T TOUCH THESE STYLES */
  	width: 80%;
  	min-height: 100vh;
  	margin: auto;
  	padding: 20px;
  	border: 10px solid pink;
  	font-family: Arial, Helvetica, sans-serif;
  }


/* Give the <main> and <nav> and <footer> elements a width of 800 pixels and center them on the page*/


/* Give the element with the ID of navlogo a width and height of 100px*/

/* Give all elements with the class of "post" a white background color, a a 5px pink border, a padding of 10px all round and a margin of 10px top and bottom*/

/* Select the li elements that are inside of the element with the ID of "navbar" and make 
1. them inline elements 
2. give them a padding of .8rem top and bottom and 1.2rem left and right
3. a background color of dodgerblue 
 */


/* Select the first li element that is inside of the element with the ID of "navbar" and 
1. give it a background of rgb(218, 22, 185)
2. a text color of white;
3.give it font weight of 700
*/



/* Select all buttons nested inside of elements with the class of "post", and give them a 2px pink border.*/


/* Make all visited links teal */


/* Select all links with an href attribute that begins with "www" and give them a color of rgb(218, 22, 185)*/


/* 
Select each h2 that is nested inside of an element with the class of "post", and add an exclamation point to the end of the h2 (using ONLY CSS)

Basically add an '!' to the end of each blog post title.  Make sure the h2 that says "Recent Posts" is not included.
*/



/* Select all paragraphs that are adjacent to an h1 and make them 20px font and give them a color of dodgerblue and center them on the page.  (there is only one paragraph that will be styled here) */


/* Make the first letter of each paragraph in each blog post 
1.40px font size
2.a text color of rgb(218, 22, 185). 
Make sure you are only selecting the paragraphs nested inside of elements with the class of "post". Do not select the "This is my blog. Blah Blah Blah."paragraph */



/* Give every second blog post div (class of "post") a background color of rgba(0, 0, 0, .8) and a color of white.  Make sure you are styling every EVEN numbered post. The first post should be white, the second rgba(0, 0, 0, .8), etc.*/
              
            
!

JS

              
                
              
            
!
999px

Console