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.


                <div class="content">
    <p>Being able to add a simple tooltip to your site without a new JS dependency is a great feeling. Obviously if you need a more robust solution, JavaScript still works great.</p>
    <p>This is based on @Una's "<span data-tip="There's a lot of other great content in this set of slides:">Power of CSS</span>" talk. She had these tooltips in there. They're super easy to do. I figured, I'd do a write up on them. Her original concept utilizied a class; this utilizes <span data-tip="In this case it's 'data-tip.' You could use anything.">the data-attribute itself</span> as the selector.</p>
    <p>You can apply it to more than just text, too, but you'll need an additional wrapper.</p>
    <figure data-tip="This is my favorite placekitten. 1000px by 800px."><img src="" alt="Alt text"></figure>


                .content {
    width: 60%;
    margin: 30px auto;
    font-size: 18px;
    line-height: 1.4em;
    color: #444;

[data-tip] {
    border-bottom: 1px dashed;
    color: tomato;
    cursor: help;
    position: relative;
    &::before, &::after {
        opacity: 0;
        display: block;
        position: absolute;
        right: 0;
        transition:  .3s opacity ease-out;
    &:hover::before, &:hover::after {
            opacity: 1;
            z-index: 1;
    &::before {
        color: #222;
        content: attr(data-tip);       
        bottom: calc(100% + 14px);
        width: 35ch;
        font-size: 15px;
        background-color: tomato;
        border-radius: 4px 4px 0 4px;
        padding: 15px;
        z-index: -1;
    &::after {
        content: "";
        width: 0;
        bottom: 100%;
        border-left: 15px solid transparent;
        border-right: 15px solid transparent;
        border-top: 15px solid tomato;

img {max-width: 100%;}