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

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="wrapper">
	<h1>How to clean your fish tank</h1>
	<ol role="list">
		<li>The best way to approach your tank clean is to start at the top before working your way down to the bottom. With that in mind, the first job on the to-do list is to get rid of any algae that's stuck to your tank's glass.</li>
		<li>With all the algae now settled on the gravel down below, it's time to give the gravel itself a quick clean – thus getting rid of any flakes of uneaten food or waste too.</li>
		<li>Once you've cleaned the gravel, you'll notice the water level in the tank will have dropped (between 10% and 20% is normal) – so now it's time to top it back up again. To do this, simply use a designated jug to transfer water into the tank – just make sure the water you're adding has been treated to suit your fish (and make sure it’s about the same temperature as your tank too!).</li>
		<li>Last on the list of jobs is to clean your filter. This only has to be done once every two weeks or so. To do this, simply pop open your filter, remove the sponge from within and soak in the dirty water you've just removed from the tank.</li>
	</ol>
</div>
              
            
!

CSS

              
                * {
	box-sizing: border-box;
}

body {
	font-family: "Open Sans", sans-serif;
	margin: 0;
	padding: 1rem;
}

.wrapper {
	max-width: 600px;
	margin: 0 auto;
}

ol {
	list-style: none;
	padding: 0;
}

li + li {
	margin-top: 1rem;
}

li {
	display: flex;
	align-items: center;
	gap: 1rem;
	background: aliceblue;
	padding: 1.5rem;
	border-radius: 1rem;
	width: calc(100% - 2rem);
	box-shadow: 0.25rem 0.25rem 0.75rem rgb(0 0 0 / 0.1);
}

li::before {
	counter-increment: list-item;
	content: counter(list-item);
	font-size: 3rem;
	font-weight: 700;
	width: 2em;
	height: 2em;
	background: black;
	flex: 0 0 auto;
	border-radius: 50%;
	color: white;
	display: flex;
	justify-content: center;
	align-items: center;
}

li:nth-child(even) {
	flex-direction: row-reverse;
	background: lavender;
	margin-right: -2rem;
	margin-left: 2rem;
}
              
            
!

JS

              
                
              
            
!
999px

Console