Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

            
              
<h1>When is a table a table?</h1>

<cite>reference: @Edds <a href="https://speakerdeck.com/edds/what-even-is-a-table-a-quick-look-at-accessibility-apis?utm_source=SOTB5+attendees&utm_campaign=76e9a2ac1e-SOTB5_feedback&utm_medium=email&utm_term=0_6dce311df4-76e9a2ac1e-356174481">what-even-is-a-table</a></cite>
<p>
    In the early days tables were used for layout, which is not semantically correct.<br>
    Qusetion: How can the browser's accessibility API differentiate bewteen a layout table and a data table?<br>
    Answer: It can't but can make an educated guess. Browsers looks at the number of rows, columns, if the rows alternate in color and other assets. <br>
    We can assist the browser by adding the role="table".

</p>

<p>This table is recognised by the Accessibility API as a table as the mark up contains role="table"</p>
<table role="table">
    <tr>
        <td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>cell</td><td>cell</td>
    </tr>
</table>

<p>This is not table enough for Chrome</p>
<table>
    <tr>
        <td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>cell</td><td>cell</td><td>cell</td>
    </tr>

</table>

<p>This is recognised as a table because rows have different colors</p>
<table>
    <tr class="pd-row0">
        <td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr class="pd-row1">
        <td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr class="pd-row0">
        <td>cell</td><td>cell</td><td>cell</td>
    </tr>
</table>


<p>This has enough rows to be recognised as a table (20 rows). Try removing one row!</p>
<table>
    <tr>
        <td>row 1</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>row 2</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>row 3</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>row 4</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>row 5</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>row 6</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>row 7</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>row 8</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>row 9</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>row 10</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>row 11</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>row 12</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>row 13</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>row 14</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>row 15</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>row 16</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>row 17</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>row 18</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>row 19</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
    <tr>
        <td>row 20 :-)</td><td>cell</td><td>cell</td><td>cell</td>
    </tr>
</table>
            
          
!

CSS

            
              table {
  border: 1px solid #999;
  margin-bottom: 24px;
}
table td {
  padding: 4px 12px;
}
.pd-row0 {
  background-color: #C8C;
}
.pd-row1 {
    background-color: #8C8;
}
body {
  padding:24px;
}
            
          
!

JS

            
              
            
          
!
999px

Console