1. Static Component Guide
  2. Govspeak content
  3. Tables

Govspeak content example

Tables

How to call this example

<%= render "govuk_component/govspeak" {
  content: "<table>
      <caption>A table with data</caption>
      <thead>
        <tr>
          <th>Heading 1</th><th>Heading 2</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>cell 1</td><td>cell 2</td>
        </tr>
        <tr>
          <td>cell 3</td><td>cell 4</td>
        </tr>
      </tbody>
    </table>
    "
} %>

How it looks

A table with data
Heading 1 Heading 2
cell 1 cell 2
cell 3 cell 4