<table>
  {% if table.caption %}<caption>{{ table.caption }}</caption>{% endif %}
  {% if table.header %}
    <thead>
      <tr>
      {% for col in table.header.cols %}
        {% if col.heading != null %}
          <th scope="col"{% if col.span %} colspan="{{ col.span }}"{% endif %}>{{ col.heading }}</th>
          {% else %}
          <td></td>
        {% endif %}
      {% endfor %}
      </tr>
    </thead>
  {% endif %}

  <tbody>
  {% for row in table.rows %}
    <tr>
      {% if row.heading %}
       