/
Creating a table

Creating a table

Tables are created using a text box and writing html source code, and then styling is automatically applied. Because the styling is done behind the scenes, you have to make sure that you use the <thead>  and <tbody>  elements in your html.

In your page layout, add a text field. Double click on the text field to open the editor. In the WYSIWYG tools, click on "source".

Then in the source code editor, use the following html example to build a table with only column headers (the first section, wrapped in <thead>)

<table>
    <thead>
        <tr>
            <th>Person 1</th>
            <th>Person 2</th>
            <th>Person 3</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Emil</td>
            <td>Tobias</td>
            <td>Linus</td>
        </tr>
        <tr>
            <td>16</td>
            <td>14</td>
            <td>10</td>
        </tr>
    </tbody>
</table>

Here is an example of a table with both column headers and row headers:

<table>
    <thead>
        <tr>
            <th>&nbsp;</th>
            <th>Pet 1</th>
            <th>Pet 2</th>
            <th>Pet 3</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <th>Species</th>
            <td>Dog</td>
            <td>Cat</td>
            <td>Frog</td>
        </tr>
        <tr>
            <th>Name</th>
            <td>Judge</td>
            <td>Norbert</td>
          <td>Trotsky</td>
      </tr>
    </tbody>
</table>


Related content

Add and Edit a Person Content Type
Add and Edit a Person Content Type
More like this
Add a Page with Components and Helpers
Add a Page with Components and Helpers
More like this
Creating Page Layouts with the Layout Canvas
Creating Page Layouts with the Layout Canvas
More like this
3 Creating Content
3 Creating Content
More like this
Taxonomy for Data Categorization
Taxonomy for Data Categorization
More like this