Pen Settings



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


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


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.


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.



DO NOT DO THIS: It won't work on iPhone.
The select wont focus and you cannot pick a currency.
<p><b>Field A:</b> One label with two inputs. (not working on mobile (tested on iPhone IOS 12). the select does not open)</p>
<label class="field">
	<span>What's the price:</span>
	<input inputmode="decimal" pattern="[0-9]*">
	<select name="mincomeCurrency">
		<option value="USD">$ USD</option>
		<option value="EUR">€ EUR</option>
		<option value="BTC">Ƀ BTC</option>

<!-- DO THIS INSTEAD. It's accessible everywhere -->
<p><b>Field B:</b> One label per input (works everywhere)</p>
<fieldset class="field">
	<span>What's the price:</span>
	<input inputmode="decimal" pattern="[0-9]*" aria-label="Amount">
	<select name="mincomeCurrency" aria-label="Currency">
		<option value="USD">$ USD</option>
		<option value="EUR">€ EUR</option>
		<option value="BTC">Ƀ BTC</option>

<p><b>Field C:</b> A button inside a label (works everywhere)</p>
<label class="field">
	<div>Add member</div>
	<div class="inputgroup">
		<input type="text" placeholder="name">
	   <button aria-label="Remove member" id="btnRemove">


                // a class where the text is invisible
// but readable by SR (screen readers).
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;

.field {
	display: block;
	margin: 0.5rem 0 2rem


                btnRemove.addEventListener('click', function() {
	alert('you clicked the X btn!')