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>Tips for keeping fish</h1>
	<ul>
		<li>The bigger the tank or aquarium the better. Most fish may be small in size, but they still need plenty of room to swim, especially if you have decided to get more than one.</li>
		<li>Think about where you place your tank. Keep it out of direct sunlight, away from windows and heating. The last thing you want is for the water in the tank to heat up out of your control.</li>
		<li>Invest in a decent filter. This will keep the water in the tank cleaner for longer, removing any debris, pollutants and waste.</li>
		<li>Add an air pump. This will keep the water in the tank oxygenated and keep it moving which is great for your fish. Pumps come in different sizes depending on the amount of litres your tank can hold.</li>
	</ul>
</div>
              
            
!

CSS

              
                * {
	box-sizing: border-box;
}

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

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

ul {
	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 {
	content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512' width='100' title='fish'%3E%3Cpath d='M327.1 96c-89.97 0-168.54 54.77-212.27 101.63L27.5 131.58c-12.13-9.18-30.24.6-27.14 14.66L24.54 256 .35 365.77c-3.1 14.06 15.01 23.83 27.14 14.66l87.33-66.05C158.55 361.23 237.13 416 327.1 416 464.56 416 576 288 576 256S464.56 96 327.1 96zm87.43 184c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24 13.26 0 24 10.74 24 24 0 13.25-10.75 24-24 24z' /%3E%3C/svg%3E");
}

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

li:nth-child(even)::before {
	transform: rotateY(180deg);
}
              
            
!

JS

              
                
              
            
!
999px

Console