Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <table>
    <!-- caption 元素用于总结表格的内容,若存在则必须为表格的第一个元素 -->
    <caption>
        Annual surface temperature change in 2022
    </caption>
    <!-- thread 和 tbody 分别包含表格的头部和主体行 -->
    <!-- tr 形成行,其中包含 th(头部)和 td(主体)单元格 -->
    <thead>
        <tr>
            <th scope="column">Country</th>
            <th scope="column">Mean temperature change (°C)</th>
        </tr>
    </thead>
    <!-- 对于 th,可以存在可选的 scope 属性,值为 row 或 column,以推断标题所属的轴 -->
    <tbody>
        <tr>
            <th scope="row">United Kingdom</th>
            <td>1.912</td>
        </tr>
        <tr>
            <th scope="row">Afghanistan</th>
            <td>2.154</td>
        </tr>
        <tr>
            <th scope="row">Australia</th>
            <td>0.681</td>
        </tr>
        <tr>
            <th scope="row">Kenya</th>
            <td>1.162</td>
        </tr>
        <tr>
            <th scope="row">Honduras</th>
            <td>0.945</td>
        </tr>
        <tr>
            <th scope="row">Canada</th>
            <td>1.284</td>
        </tr>
    </tbody>
    <tfoot>
        <tr>
            <th scope="row">Global average</th>
            <td>1.4</td>
        </tr>
    </tfoot>
</table>
              
            
!

CSS

              
                body {
  font-family: "Open Sans", sans-serif;
  line-height: 1.5;
}

table {
  text-align: left;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid;
}
              
            
!

JS

              
                
              
            
!
999px

Console