Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's 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 it's URL and the proper URL extention.

+ 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.


<link id="import-theme" rel="stylesheet" href=""/>
<script src=""></script>
<script src=""></script>

<!--Code-input is on GitHub ==>>
<link rel="stylesheet" href="">
<script src=""></script>
<script src=""></script>
<script src=""></script>
  codeInput.registerTemplate("code-input", codeInput.templates.prism(Prism, [new codeInput.plugins.Indent()]));

<h2><code>code-input</code> - <a href="" target="_blank"><b>View on GitHub</b></a></h2>
<h3><a href="" target="_blank"><img src="" alt="Latest Release"/> <img src="" alt="MIT-licensed"/></a><br/><small><a href="#wysiwyg">WYSIWYG it ⬇️</a></small></h3>
  <header><a href="" target="_blank">v1.1</a> is out now, with new plugins for autodetecting languages, and the option to register after creating an element!</header>

<code-input style="resize: both; overflow: hidden; width: 40%;" lang="JavaScript" placeholder="Write some JavaScript!" value="console.log('Hello, World!');
for(let i = 0; i < 10; i++) {
	// Press Enter...
// Write some code!"></code-input>

<p>This is a demo of a custom element for editable, syntax-highlighted code, inspired by a suggestion in a comment! Please see the CSS-Tricks article <a href="">here</a>, and the original demo <a href="">here</a>.</p>
<p>This could be used for HTML forms where code is submitted, quizzes or code editors, and acts like a normal <code>&lt;textarea&gt;</code> element. Syntax highlighting by Prism.js, and editability by WebCoder49.</p>


  <label for="select-theme">Theme: </label><select id="select-theme" onchange="document.querySelector('#import-theme').setAttribute('href', this.value);">
    <option value="">Default</option>
    <option value="">Tomorrow Night (Rosey)</option>
    <option value="">Dark</option>
    <option value="">Funky</option>
  </select> <em>(Static syntax highlighting powered by <a href="">Prism.js</a>)</em>
  <code-input style="height: 300px; width: 30%; float: left; margin: 1%;" lang="HTML" name="html_code" placeholder="HTML"></code-input>
  <code-input style="height: 300px; width: 30%; float: left; margin: 1%;" lang="CSS" name="css_code" placeholder="CSS"></code-input>
  <code-input style="height: 300px; width: 30%; float: left; margin: 1%;" lang="JavaScript" name="js_code" placeholder="JavaScript"></code-input>

<h2 id="wysiwyg">Try it out here!</h2>
  <code-input style="margin: 20px; margin-bottom: 50px;" oninput="document.querySelector('#dynamic-demo').innerHTML = this.value;" lang="HTML" name="html_code" placeholder="<!--This will edit the example below.-->" value="<!--This will edit the example below.-->
<code-input lang=''></code-input>"></code-input>
  <div id="dynamic-demo" style="margin: 20px; margin-bottom: 50px;">
    <!--This will edit the example below.-->

<p>Please see the <a href="">GitHub README</a>. </p>
<script>codeInput.registerTemplate("code-input", codeInput.templates.prism(Prism));</script>


                /* Please see GitHub link */

body {
  font-family: "Lato", sans-serif;

header {
  background-color: beige;
  color: #400;
  text-align: center;
  font-size: 120%;
  padding: 10px;
  border-radius: 10px;
  margin: 10px;
  width: 100%;
  max-width: 500px;


                /* Please see GitHub link */