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">
    <h1>::after elements for icons on a link</h1>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat ipsum sit amet eros fermentum aliquet. <a class="external" href="">Etiam lorem nulla</a>, dictum vitae mi et, ultricies scelerisque lacus. Vestibulum posuere ex nec volutpat bibendum. Etiam ut vehicula mi, <a href="something.pdf">eu egestas metus</a>. Pellentesque sagittis non tellus venenatis finibus. Quisque porta mauris purus, non tincidunt tortor bibendum in. Morbi eget diam et odio tincidunt venenatis. Nulla sodales porttitor leo at dignissim. Etiam a vestibulum ipsum, id placerat risus. Mauris sed bibendum nisi. Donec ut faucibus justo. Duis pulvinar dui vitae dolor aliquet, id elementum magna accumsan. Nunc fermentum elementum felis nec eleifend. Sed ut diam congue magna dapibus ultrices ac eu arcu. Aenean vulputate purus eget gravida consequat.</p>



                a[href^="http"]::after {
    background-image: url(;
    background-size: contain;
    display: inline-block;
    vertical-align: middle;
    width: 1em;
    height: 1em;

a[href$=".pdf"]::after {
    content:" (pdf)";
    font-size: .7em;
    color: tomato;

p {
    line-height: 1.5em;
    font-size: 1.2rem;
a {
    text-decoration: none;
.container {
    max-width: 900px;
    margin: 40px auto;