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>
  <tr>
    <th>名前</th>
    <th>職種</th>
    <th>年齢</th>
  </tr>
  <tr>
    <td>山田 太郎</td>
    <td>エンジニア</td>
    <td>30</td>
  </tr>
  <tr>
    <td>鈴木 一郎</td>
    <td>マネージャー</td>
    <td>45</td>
  </tr>
  <tr>
    <td>佐藤 恵子</td>
    <td>デザイナー</td>
    <td>28</td>
  </tr>
</table>
              
            
!

CSS

              
                :root {
  --edge:16px;
}
table {
  border-spacing: 0;
  //collapseの場合、角が丸くならない
  // border-collapse: collapse;
  border-radius: var(--edge);
  border: 1px solid black;
  //captionまでかかるからだめ
  // outline: 1px solid black;
}

th:not(:last-child),td:not(:last-child) {
  //thの最後以外のth(名前と職種のみ適用)とtdの最後以外のtd(年齢の列以外のtd)
    border-right: 1px solid black;
}
th, tr:not(:last-child) td{
  //th全部(名前・職種・年齢)とtrの最後のtd以外のtd(佐藤 恵子の行以外のtd)
    border-bottom: 1px solid black;
}

caption {
  padding: 10px;
  font-size: 1.25rem;
}

tr > * {
  padding: .75em; 
  text-align: center;
}
tr:has( >th){
  clip-path: inset(0 round var(--edge) var(--edge) 0 0);
  background-color: #aff9ff;
}

              
            
!

JS

              
                
              
            
!
999px

Console