Marsha Docs

Table Shortcode

Note on Tables

Tables should only be used to display tabular data. If the University web team notices misuse of tables on your webpages we will reach out and work with you to correct the content. If you have questions about when to use, or not use, a table you can contact the UComm Web Team and we will be happy to assist you.

Tables are a great way to display certain kinds of information.

Table Shortcode Parameters

The parameters for the tables shortcode:

  • Bordered (bordered): If this parameter is set to "yes" then all the table cells will have borders. The default is table without any borders.
  • Striped (striped): If this parameter is set to "yes" then all the non-heading table rows will alternate between a white background and a light gray background. The default is a non-striped table.
  • Full-Width (full): If this parameter is set to "yes" then the table will automatically fill to 100% of the available space. The default is a table that only takes up the width it needs.

Table Shortcode Examples

Basic Table

Shortcode
HTML
Heading 1 Heading 2
Data 1 Data 2
Data 3 Data 4
[efstable]
[efstable_head]
[efstable_row]
[efsth_column]Col 1[/efsth_column]
[efsth_column]Col 2[/efsth_column]
[/efstable_row]
[/efstable_head]
[efstable_body]
[efstable_row]
[efsrow_column]Data 1[/efsrow_column]
[efsrow_column]Data 2[/efsrow_column]
[/efstable_row]
[efstable_row]
[efsrow_column]Data 3[/efsrow_column]
[efsrow_column]Data 4[/efsrow_column]
[/efstable_row]
[/efstable_body]
[/efstable]
<div class="large-table">
    <table class="table">
        <thead>
            <tr>
                <th>Heading 1</th>
                <th>Heading 2</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Data 1</td>
                <td>Data 2</td>
            </tr>
            <tr>
                <td>Data 3</td>
                <td>Data 4</td>
            </tr>
        </tbody>
    </table>
</div>
Copy Code to Clipboard
Copy Code to Clipboard

Bordered Table

Shortcode
HTML
Heading 1 Heading 2
Data 1 Data 2
Data 3 Data 4
[efstable bordered="yes"]
[efstable_head]
[efstable_row]
[efsth_column]Col 1[/efsth_column]
[efsth_column]Col 2[/efsth_column]
[/efstable_row]
[/efstable_head]
[efstable_body]
[efstable_row]
[efsrow_column]Data 1[/efsrow_column]
[efsrow_column]Data 2[/efsrow_column]
[/efstable_row]
[efstable_row]
[efsrow_column]Data 3[/efsrow_column]
[efsrow_column]Data 4[/efsrow_column]
[/efstable_row]
[/efstable_body]
[/efstable]
<div class="large-table">
    <table class="table table-bordered">
        <thead>
            <tr>
                <th>Heading 1</th>
                <th>Heading 2</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Data 1</td>
                <td>Data 2</td>
            </tr>
            <tr>
                <td>Data 3</td>
                <td>Data 4</td>
            </tr>
        </tbody>
    </table>
</div>
Copy Code to Clipboard
Copy Code to Clipboard

Striped Table

Shortcode
HTML
Heading 1 Heading 2
Data 1 Data 2
Data 3 Data 4
[efstable striped="yes"]
[efstable_head]
[efstable_row]
[efsth_column]Col 1[/efsth_column]
[efsth_column]Col 2[/efsth_column]
[/efstable_row]
[/efstable_head]
[efstable_body]
[efstable_row]
[efsrow_column]Data 1[/efsrow_column]
[efsrow_column]Data 2[/efsrow_column]
[/efstable_row]
[efstable_row]
[efsrow_column]Data 3[/efsrow_column]
[efsrow_column]Data 4[/efsrow_column]
[/efstable_row]
[/efstable_body]
[/efstable]
<div class="large-table">
    <table class="table table-striped">
        <thead>
            <tr>
                <th>Heading 1</th>
                <th>Heading 2</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Data 1</td>
                <td>Data 2</td>
            </tr>
            <tr>
                <td>Data 3</td>
                <td>Data 4</td>
            </tr>
        </tbody>
    </table>
</div>
Copy Code to Clipboard
Copy Code to Clipboard

Full-Width Table

Shortcode
HTML
Heading 1 Heading 2
Data 1 Data 2
Data 3 Data 4
[efstable full="yes"]
[efstable_head]
[efstable_row]
[efsth_column]Col 1[/efsth_column]
[efsth_column]Col 2[/efsth_column]
[/efstable_row]
[/efstable_head]
[efstable_body]
[efstable_row]
[efsrow_column]Data 1[/efsrow_column]
[efsrow_column]Data 2[/efsrow_column]
[/efstable_row]
[efstable_row]
[efsrow_column]Data 3[/efsrow_column]
[efsrow_column]Data 4[/efsrow_column]
[/efstable_row]
[/efstable_body]
[/efstable]
<div class="large-table">
    <table class="table w-full">
        <thead>
            <tr>
                <th>Heading 1</th>
                <th>Heading 2</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Data 1</td>
                <td>Data 2</td>
            </tr>
            <tr>
                <td>Data 3</td>
                <td>Data 4</td>
            </tr>
        </tbody>
    </table>
</div>
Copy Code to Clipboard
Copy Code to Clipboard

Combination Table

Shortcode
HTML
Heading 1 Heading 2
Data 1 Data 2
Data 3 Data 4
[efstable striped="yes" bordered="yes" full="yes"]
[efstable_head]
[efstable_row]
[efsth_column]Col 1[/efsth_column]
[efsth_column]Col 2[/efsth_column]
[/efstable_row]
[/efstable_head]
[efstable_body]
[efstable_row]
[efsrow_column]Data 1[/efsrow_column]
[efsrow_column]Data 2[/efsrow_column]
[/efstable_row]
[efstable_row]
[efsrow_column]Data 3[/efsrow_column]
[efsrow_column]Data 4[/efsrow_column]
[/efstable_row]
[/efstable_body]
[/efstable]
<div class="large-table">
    <table class="table w-full table-bordered table-striped">
        <thead>
            <tr>
                <th>Heading 1</th>
                <th>Heading 2</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Data 1</td>
                <td>Data 2</td>
            </tr>
            <tr>
                <td>Data 3</td>
                <td>Data 4</td>
            </tr>
        </tbody>
    </table>
</div>
Copy Code to Clipboard
Copy Code to Clipboard