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

Auto Save

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 id="wrapper">
  <form id="login">
		<label>
			Label
			<input type="text">
		</label>
		<label>
			Label
			<input type="text">
		</label>
		<label>
			Label
			<input type="text">
		</label>
		<button>Submit</button>
  </form>
  <main>
		<h1>Some title</h1>
		<section>
			<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et suscipit sapien. Vestibulum sem neque, aliquet non nisl non, consequat egestas urna. Nulla commodo nunc in congue vulputate. Nulla venenatis, nisl nec tincidunt vulputate, lacus massa finibus risus, in consectetur elit felis eu urna. Cras sollicitudin, erat in ultricies venenatis, tellus nunc vulputate est, id rhoncus massa dolor sit amet urna. Donec fringilla metus vitae ultricies commodo. Morbi eu ipsum a tortor lacinia fringilla. Nullam eu sem sed libero sodales accumsan. Fusce tristique ornare fringilla. Proin at augue ac risus maximus pretium. Cras mollis odio quis vulputate tincidunt. In hac habitasse platea dictumst. Vivamus a dui sed enim consequat molestie id vitae sapien.</p>

			<p>Curabitur non odio sit amet odio tincidunt dignissim. In nec dui scelerisque, vehicula libero vel, porttitor leo. Morbi facilisis vel odio at tincidunt. Donec ante justo, dictum nec commodo vitae, dapibus ut ipsum. Suspendisse consectetur diam tristique libero egestas finibus. Vestibulum id ullamcorper erat. Etiam bibendum suscipit faucibus.</p>
		</section>
  </main>
</div>
              
            
!

CSS

              
                *, *::before, *::after {
	box-sizing: border-box;
}

body {
	margin: 20px;
}

#wrapper {
  display: flex;
	gap: 15px;
}
main {
  flex: 1;
	> :first-child {
		margin-top: 0;
	}
	> :last-child {
		margin-bottom: 0;
	}
}
form#login {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 300px;
	* {
		width: 100%;
	}
	input {
		margin-top: 2px;
	}
}

/* @media (prefers-interaction-direction: right) { */
  main {
    order: -1;
  }
/* } */
              
            
!

JS

              
                
              
            
!
999px

Console