Govspeak content example

Tables with alignments

How it looks (preview)

Default aligned Left aligned Center aligned Right aligned
First body part Second cell Third cell fourth cell

How to call this example

<%= render "govuk_publishing_components/components/govspeak", {} do %>
  <table>
  <thead>
    <tr>
      <th scope="col">Default aligned</th>
      <th class="cell-text-left" scope="col">Left aligned</th>
      <th class="cell-text-center" scope="col">Center aligned</th>
      <th class="cell-text-right" scope="col">Right aligned</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>First body part</td>
      <td class="cell-text-left">Second cell</td>
      <td class="cell-text-center">Third cell</td>
      <td class="cell-text-right">fourth cell</td>
    </tr>
  </tbody>
</table>
<% end %>