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.


                <div class="news">
        <h1 class="title">The First line pseudo element</h1>
            The ::first-letter pseudo-element is used to add a special style to the first letter of a text if it is not preceded by any other content (such as images or inline tables) on its line. This is a very common styling used by blog authors. It can only be
            applied to block-level elements. Suppose you want to style the first letter of an article so it has a different color and size from other letters, this would be easier done with the ::first-letter pseudo-element than making use of JavaScript
            to get the first first letter of a particular element.


                * {
            padding: 0;
            margin: 0;
            box-sizing: border-box;
        body {
            width: 100%;
            height: 100vh;
            margin: auto;
            padding: 20px;
            border: 10px solid rgb(20, 120, 252);
            font-family: Arial, Helvetica, sans-serif;
            text-align: center;
        .title {
            padding: 20px 0;
        p {
            padding: 10px 0;
        @media (min-width:700px) {
            body {
                width: 600px;
        p {
            line-height: 20px;
        /* Appling the first-line pseudo element to the paragraph element */
        p::first-line {
            background-color: rgb(20, 120, 252);
            color: #fff;
            word-spacing: 8px;
            font-style: italic;
            font-weight: bold;