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.


                <p>Here is a simple attractive table, well-suited to be <a href="">sent in an email report</a>.</p>

<table class="styled-table">
            <th>Years Exp.</th>
            <td class="exper">3</td>
        <tr class="active-row">
            <td class="exper">1.5</td>
                <tr class="active-row">
            <td class="exper">14</td>
        <!-- and so on... -->


                /*Most of these are self explanatory but let's have a look at the main ones:
box-shadow to add a subtle transparent shadow around the table
border-collapse to ensure there is no space between the cell borders
body {font: 16px courier, monospace; margin: 25px 10px;}
.styled-table {
    border-collapse: collapse;
    margin: 25px 50px;
    font-size: 0.9em;
    font-family: courier;
    min-width: 400px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);

Styling the header:
For the header, we can simply change the background color and apply some basic styles to the text:*/

.styled-table thead tr {
    background-color: darkred;
    color: #ffffff;
    text-align: left;
/*Moving onto the table cells. Let's space things out a bit: */
.styled-table th,
.styled-table td {
    padding: 12px 15px;
/* And the table rows...
For these, we want to do 3 things:

Add a bottom border to each row for separation
Add a lighter background to every second row to help readability
Add a dark border to the very last row to signify the end of the table */
.styled-table tbody tr {border-bottom: 1px solid #dddddd;}
.styled-table tbody tr:nth-of-type(even) {background-color: #f3f3f3;}
/* I don't think the dark border looks great with the drop shadow 
.styled-table tbody tr:last-of-type {border-bottom: 2px solid darkred;} */

/* Lastly, let's make the active row look different
For this, we're just going to make changes to the text: 
No use for this in email! commented out
.styled-table tbody {font-weight: bold; color: #009879;}*/
/* Failed attempt at right alignment for third column cell 
.styled-table .exper {align: right}*/
/* Some modern alignment code */
.styled-table tr td:nth-child(1), .styled-table tr th:nth-child(2) {text-align: left;}
.styled-table tr td:nth-child(2), .styled-table tr th:nth-child(2) {text-align: right;}
.styled-table tr td:nth-child(3), .styled-table tr th:nth-child(3) {text-align: center;}