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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

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


                <div class="container">
    <h2>Style-able Input Placeholder</h2>
    <label for="">
        <input type="text">
    <label for="" class="underline">
        <input type="text">
    <label for="" class="bold">
        <input type="text">


                .container {
    text-align: center;

.container > h2 {
    font-family: sans-serif;
    text-align: center;

label {
    position: relative;

input {
    padding: 4px 6px;

label:after {
    content: "Search";
    position: absolute;
    padding-left: 6px;
    font-family: sans-serif;
    font-size: 14px;
    color: #999;
    opacity: 0.9;
    top: 2px;
    left: 2px;
    cursor: text;

label.underline:after {
    text-decoration: underline;

label.bold:after {
    font-weight: bold;

label.hide-placeholder:after {
    content: "";


 * Ya'll asked for Style-able Placeholders that work in IE8+
 * So here's some JS too (jQuery is purely optional).
 * Go on purists, make it vanilla JS.

var $input = $('input'),
    $label = $input.parent();

// Need this handler as clicking on pseudo ::after won't focus textbox directly.
$label.on('click', function(e) {

// If user types something, hide placeholder.
$input.on('input', function(e) {
    if ($(this).val())