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

              
                <article>
  <form>
<p>Example 1: Match input pattern with a limit of 2. Here, lowercase letters wont work</p>
<input type="text" name="name" pattern="[A-Z]{2}" title="2 Uppercase characters only">
<br>
<p>Example 2: Match input pattern with a limit of 2. Uppercase letters won't work</p>
<input type="text" name="name" pattern="[^A-Z]{2}" title="Any 2 characters only, not uppercase letters">
<br>
<p>Example of Specifying input values. Users must choose from the list</p>
<input type="text" name="food" placeholder="Select beans or rice" pattern="beans|rice" title="Enter either beans or rice only">
<p>Example 3: Let's accommodate uppercase letters</p>
<input type="text" name="food" placeholder="Select beans or rice" pattern="[Bb]eans|[Rr]ice" title="Enter either beans or rice only">
<p>Example 4: Lets create a list of values</p>
<input type="text" name="food" list="myFood" pattern="[Bb]eans|[Rr]ice|[Nn]oodles|[Yy]am|[Ss]emovita|[Gg]arri" title="Select from the list: Beans, Rice, Noodles, Yam, Semovita and Garri" size="30">
	<datalist id="myFood">
			<option value="Beans">
			<option value="Rice">
			<option value="Noodles">
			<option value="Yam">
			<option value="Semovita">
			<option value="Garri">
	</datalist>
	<br>
	<p>Example 5: Create an email pattern</p>
<input type="email" name="email" pattern="[a-z][email protected][a-z]+\.[a-z]{3,}" title="Your email must contain only small letters. Digits and 2 letter domains are not allowed" placeholder="Enter Email Address" size="35">
<br>
<p>Example of  6: Joining input entries</p>
<input type="text" name="name" pattern="([A-Z]{2})([a-z]{4})" title="Must contain 2 Uppercase and 4 lowercase characters">
<br>
<p> Example 7: Create Password Pattern</p>
    <input type="password" name="pw" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}" title="Password must be at least 6 characters with number, Uppercase and lowercase letters">
<button type="submit">Send</button>
			</form>
</article>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console