<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
table, th, td {
  border: 1px solid black;
  border-collapse: collapse;

}
</style>
</head>
<body>
<table style="width:100%">
  <tr>
    {% for key in keys %}
    <th>
      {{ key }}
    </th>
    {% endfor %}
  </tr>
  {% for summary in position_summaries %}
  <tr>
    {% for key in keys %}
    <td>
      {{ summary[key]|default('', True) }}
    </td>
    {% endfor %}
  </tr>
  {% endfor %}
</table>
</body>
</html>