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.


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.


                <dialog id="dialog">
    <button type="submit" aria-label="close" formmethod="dialog" formnovalidate>X</button>
    <h2 id="dialogid">MLW Registration</h2>
    <p>All fields are required</p>
           <input type="text" name="name" required />
          <input type="number" min="0" max="10" step=”1” name="warranty" required />
       <label>Power source:
           <select name="powersoure">
       <button type="submit" formmethod="post">Submit</button>
    <p>Additional buttons</p>
      <button id="jsbutton">JS close</button>
      <button id="reset" type="reset">Reset</button>

<button id="modal">Open Modal dialog</button>
<p id="text"></p>
<h2>Random interactive elements</h2>
<p>Before opening the dialog, tab thru these interactive elements. Then try again when the dialog is open.</p>
<p>When the dialog is open, are any of these normally interactive elements interactive?</p>
<p><a href="">Machine Learning Workshop</a></p>
  <p><label>Here is a useless input: <input></label></p>
       <label>Here is a useless select:
           <select name="yummy">
          <option>Maple Syrup</option>
          <option>Ice Cream</option>


                body {
  background: #a4bacc99;
  color: #226daa;
  font-family: Raleway, sans-serif;
  accent-color: #226DAA;
a:hover, a:focus {
  text-underline-offset: 0.25em;
[aria-label="close"] {
  appearance: none;
  float: right;
  border: 1px solid;
  border-radius: 50%;
dialog :focus {
  outline: 2px solid #226DAA;


                const dialog = document.getElementById('dialog');
const text = document.getElementById('text');
const jsbutton = document.getElementById('jsbutton');
const modal = document.getElementById('modal');
const reset = document.getElementById('reset');

modal.addEventListener('click', (event) => {
  text.textContent = '';

jsbutton.addEventListener('click', (event) => {
  text.innerHTML += '"JS close" closed the dialog.<br/>';

dialog.addEventListener('cancel', (event) => {
  text.innerHTML += 'cance event happened<br/>';

dialog.addEventListener('close', (event) => {
  text.innerHTML += 'close event happened<br/>';