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

              
                <div class="entry-content">
	<h1>Amazing Dinosaur Facts</h1>
	<figure>
		<img src='https://images.unsplash.com/photo-1603589138334-be34651248b0?crop=entropy&cs=srgb&fm=jpg&ixid=MnwxNDU4OXwwfDF8cmFuZG9tfHx8fHx8fHx8MTYzMjA4ODM5NQ&ixlib=rb-1.2.1&q=850' alt='Plastic dinosaur figures by the pool'>
	</figure>
	<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Curabitur gravida arcu ac tortor dignissim convallis aenean et. Semper auctor neque vitae tempus quam pellentesque nec. Accumsan lacus vel facilisis volutpat est velit. Nulla posuere sollicitudin aliquam ultrices sagittis orci a. Vitae auctor eu augue ut. Aliquet bibendum enim facilisis gravida neque convallis. Nisl nisi scelerisque eu ultrices vitae. Tincidunt nunc pulvinar sapien et ligula.</p>
	<h2>How do we know so much about dinosaurs?</h2>
	<p>Magnis dis parturient montes nascetur ridiculus mus mauris vitae ultricies. Enim diam vulputate ut pharetra sit amet aliquam id diam. Adipiscing elit duis tristique sollicitudin nibh sit. Non enim praesent elementum facilisis leo vel fringilla est ullamcorper.</p>
	<figure>
		<img src='https://images.unsplash.com/photo-1554727225-ee66ff0a1bc5?crop=entropy&cs=srgb&fm=jpg&ixid=MnwxNDU4OXwwfDF8cmFuZG9tfHx8fHx8fHx8MTYzMjA4ODM5NQ&ixlib=rb-1.2.1&q=85' alt='Plastic dinosaur figures at a party'>
	</figure>
	<h3>How you can learn about dinosaurs</h3>
	<ul>
		<li>Sed risus ultricies tristique nulla aliquet enim tortor at auctor. Massa tincidunt nunc pulvinar sapien et ligula. Sit amet consectetur adipiscing elit.</li>
		<li>Turpis massa sed elementum tempus egestas.</li>
		<li>Elementum pulvinar etiam non quam lacus suspendisse. Egestas fringilla phasellus faucibus scelerisque eleifend donec pretium.</li>
	</ul>
	<h2>Did dinosaurs really exist?</h2>
	<p>Yes. Semper eget duis at tellus at urna condimentum mattis pellentesque. Donec ac odio tempor orci dapibus ultrices in. In hac habitasse platea dictumst quisque sagittis purus sit. Ipsum consequat nisl vel pretium. Quisque sagittis purus sit amet volutpat. Eget felis eget nunc lobortis mattis aliquam faucibus purus in.</p>
	<blockquote>
		<p>Dinosaurs lived a really long time ago, but they can teach us a lot about the present day</p>
		<cite>Professor Dinosaurus, University of Fossils</cite>
	</blockquote>
	<h2>When did the dinosaurs become extinct?</h2>
	<p>About 65 million years ago. But they will live on in our hearts forever.</p>
</div>
              
            
!

CSS

              
                * {
	box-sizing: border-box;
}

img {
	width: 100%;
	display: block;
}

/* Layout stuff using `:is()` */
.entry-content {
	--vr: 1rem;
	
	> * {
		max-width: 50rem;
		margin: 0 auto;
	}
	
	> * + * {
		margin-top: var(--vr);
	}
	
	> * + :is(h2, h3, h4, figure, blockquote),
	> :is(figure, blockquote) + * {
		margin-top: calc(var(--vr) * 2);
	}
	
	@media (min-width: 50em) {
		--vr: 1.3rem;
	}
}

/* General styling */
body {
	font-family: Lato, sans-serif;
	line-height: 1.6;
	padding: 1rem;
	
	@media (min-width: 50em) {
		font-size: 1.3rem;
	}
}

h1, h2, h3 {
	line-height: 1.3;
}

blockquote {
	font-size: 1.5em;
	line-height: 1.3;
	padding-left: 1em;
	border-left: 2px solid rgba(193, 198, 217);
	
	p {
		&:first-of-type {
			margin-top: 0;
		}
		
		&:last-of-type {
			margin-bottom: 0;
		}
	}
}

cite {
	font-size: 1rem;
}
              
            
!

JS

              
                
              
            
!
999px

Console