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

              
                <body>
    <header>
        <h1>HTML Table Showcase</h1>
        <p>A Celebration of Creative Table Layouts Without CSS</p>
    </header>

    <div class="container">
        <!-- Repeat the table-wrapper 15 times for the showcase -->
        <div class="table-wrapper">
            <h3>Circular Table Layout</h3>
            <table>
                <tr>
                  <td colspan="4">&nbsp;</td>
                  <td rowspan="3">Center&nbsp;</td>
                  <td colspan="4">&nbsp;</td>
                </tr>
                <tr>
                  <td colspan="2">&nbsp;</td>
                  <td colspan="2">&nbsp;</td>
                  <td colspan="2">&nbsp;</td>
                  <td colspan="2">&nbsp;</td>
                </tr>
                <tr>
                  <td>1</td>
                  <td>2</td>
                  <td>3</td>
                  <td>4</td>
                  <td>5</td>
                  <td>6</td>
                  <td>7</td>
                  <td>8</td>
                </tr>
            </table>   
        </div>
        
        <div class="table-wrapper">
            <h3>Staggered Steps Table</h3>
              <table>
                <tr>
                  <td>Step 1</td>
                  <td></td>
                  <td></td>
                  <td></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>Step 2</td>
                  <td></td>
                  <td></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>Step 3</td>
                  <td></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>Step 4</td>
                </tr>
            </table>
        </div>

        <div class="table-wrapper">
            <h3>Diamond Layout</h3>
            <table>
                <tr>
                  <td colspan="3"></td>
                  <td>Top</td>
                  <td colspan="3"></td>
                </tr>
                <tr>
                  <td colspan="2"></td>
                  <td>Left</td>
                  <td></td>
                  <td>Right</td>
                  <td colspan="2"></td>
                </tr>
                <tr>
                  <td></td>
                  <td>Bottom Left</td>
                  <td></td>
                  <td>Center</td>
                  <td></td>
                  <td>Bottom Right</td>
                  <td></td>
                </tr>
            </table>              
        </div>

        <div class="table-wrapper">
            <h3>Zigzag Layout</h3>
            <table>
                <tr>
                  <td>Zig</td>
                  <td colspan="2"></td>
                </tr>
                <tr>
                  <td colspan="2"></td>
                  <td>Zag</td>
                </tr>
                <tr>
                  <td>Zig</td>
                  <td colspan="2"></td>
                </tr>
                <tr>
                  <td colspan="2"></td>
                  <td>Zag</td>
                </tr>
            </table>              
        </div>

        <div class="table-wrapper">
            <h3>Pyramid Layout</h3>
            <table>
                <tr>
                  <td colspan="5"></td>
                  <td>Peak</td>
                  <td colspan="5"></td>
                </tr>
                <tr>
                  <td colspan="4"></td>
                  <td colspan="3">Middle</td>
                  <td colspan="4"></td>
                </tr>
                <tr>
                  <td colspan="3"></td>
                  <td colspan="5">Base</td>
                  <td colspan="3"></td>
                </tr>
            </table>              
        </div>

        <div class="table-wrapper">
            <h3>Checkerboard Layout</h3>
            <table>
                <tr>
                  <td></td>
                  <td>Black</td>
                  <td></td>
                  <td>Black</td>
                </tr>
                <tr>
                  <td>Black</td>
                  <td></td>
                  <td>Black</td>
                  <td></td>
                </tr>
                <tr>
                  <td></td>
                  <td>Black</td>
                  <td></td>
                  <td>Black</td>
                </tr>
                <tr>
                  <td>Black</td>
                  <td></td>
                  <td>Black</td>
                  <td></td>
                </tr>
            </table>              
        </div>

        <div class="table-wrapper">
            <h3>Hourglass Layout</h3>
            <table>
                <tr>
                  <td></td>
                  <td></td>
                  <td>Top</td>
                  <td></td>
                  <td></td>
                </tr>
                <tr>
                  <td></td>
                  <td>Middle Left</td>
                  <td></td>
                  <td>Middle Right</td>
                  <td></td>
                </tr>
                <tr>
                  <td>Bottom Left</td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td>Bottom Right</td>
                </tr>
              </table>
        </div>

        <div class="table-wrapper">
            <h3>Wave Layout</h3>
            <table>
                <tr>
                  <td></td>
                  <td>Wave</td>
                  <td></td>
                  <td>Wave</td>
                </tr>
                <tr>
                  <td>Wave</td>
                  <td></td>
                  <td>Wave</td>
                  <td></td>
                </tr>
                <tr>
                  <td></td>
                  <td>Wave</td>
                  <td></td>
                  <td>Wave</td>
                </tr>
            </table>              
        </div>

        <div class="table-wrapper">
            <h3>Tetris Block Table</h3>
            <table>
                <tr>
                  <td rowspan="2"></td>
                  <td rowspan="2">Block</td>
                  <td></td>
                  <td>Block</td>
                </tr>
                <tr>
                  <td colspan="2">Block</td>
                </tr>
                <tr>
                  <td colspan="3">Base</td>
                  <td></td>
                </tr>
            </table>              
        </div>

        <div class="table-wrapper">
            <h3>Star Layout</h3>
            <table>
                <tr>
                  <td colspan="2"></td>
                  <td>Top</td>
                  <td colspan="2"></td>
                </tr>
                <tr>
                  <td></td>
                  <td>Left</td>
                  <td></td>
                  <td>Right</td>
                  <td></td>
                </tr>
                <tr>
                  <td colspan="2"></td>
                  <td>Bottom</td>
                  <td colspan="2"></td>
                </tr>
            </table>              
        </div>

        <div class="table-wrapper">
            <h3>Arrow Layout</h3>
            <table>
                <tr>
                  <td colspan="3"></td>
                  <td>Head</td>
                  <td colspan="3"></td>
                </tr>
                <tr>
                  <td colspan="2"></td>
                  <td>Body</td>
                  <td></td>
                  <td>Body</td>
                  <td colspan="2"></td>
                </tr>
                <tr>
                  <td></td>
                  <td>Tip</td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td>Tip</td>
                  <td></td>
                </tr>
            </table>              
        </div>

        <div class="table-wrapper">
            <h3>Bullseye Layout</h3>
            <table>
                <tr>
                  <td colspan="5"></td>
                  <td>Outer</td>
                  <td colspan="5"></td>
                </tr>
                <tr>
                  <td colspan="3"></td>
                  <td>Middle</td>
                  <td></td>
                  <td>Middle</td>
                  <td colspan="3"></td>
                </tr>
                <tr>
                  <td colspan="4"></td>
                  <td>Center</td>
                  <td colspan="4"></td>
                </tr>
            </table>              
        </div>

        <div class="table-wrapper">
            <h3>Cross Layout</h3>
            <table>
                <tr>
                  <td></td>
                  <td></td>
                  <td>Top</td>
                  <td></td>
                  <td></td>
                </tr>
                <tr>
                  <td></td>
                  <td></td>
                  <td>Center</td>
                  <td></td>
                  <td></td>
                </tr>
                <tr>
                  <td>Left</td>
                  <td>Center</td>
                  <td>Middle</td>
                  <td>Center</td>
                  <td>Right</td>
                </tr>
            </table>              
        </div>

        <div class="table-wrapper">
            <h3>Maze Layout</h3>
            <table>
                <tr>
                  <td>Start</td>
                  <td></td>
                  <td></td>
                  <td></td>
                </tr>
                <tr>
                  <td></td>
                  <td>Path</td>
                  <td></td>
                  <td></td>
                </tr>
                <tr>
                  <td></td>
                  <td></td>
                  <td>Path</td>
                  <td>End</td>
                </tr>
            </table>              
        </div>

        <div class="table-wrapper">
            <h3>Fishbone Layout</h3>
            <table>
                <tr>
                  <td></td>
                  <td></td>
                  <td>Head</td>
                  <td></td>
                  <td></td>
                </tr>
                <tr>
                  <td></td>
                  <td>Top Fin</td>
                  <td>Body</td>
                  <td>Bottom Fin</td>
                  <td></td>
                </tr>
                <tr>
                  <td>Tail</td>
                  <td></td>
                  <td>Body</td>
                  <td></td>
                  <td>Tail</td>
                </tr>
            </table>              
        </div>
    </div>

    <footer>
        Created by Govind Vyas with love from India.
    </footer>
</body>
              
            
!

CSS

              
                body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #d9f0ff;
    color: #333;
}

header {
    background-color: #83c9f4;
    padding: 20px;
    text-align: center;
    color: white;
}

header h1 {
    margin: 0;
    font-size: 2rem;
}

header p {
    margin: 5px 0 0;
    font-size: 1.2rem;
}

.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

table {
    border: 1px solid;
}

.table-wrapper {
    background-color: white;
    border: 2px solid #a3d5ff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.table-wrapper:hover {
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.19);
}

h3 {
    text-align: center;
    opacity: 0.8;
}

.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.table-wrapper table td {
    border: 1px solid #a3d5ff;
    padding: 10px;
}

footer {
    background-color: #83c9f4;
    color: white;
    text-align: center;
    padding: 20px;
    position: relative;
    bottom: 0;
}

/* Media Query for Tablet and Mobile View */
        @media (max-width: 768px) {
            .container {
                grid-template-columns: 1fr;
            }
        }
              
            
!

JS

              
                
              
            
!
999px

Console