Display number list in this format django
<p>I am trying to display my parsed result in the django template but at the moment, the code and result I have is as follows and I can't think of something else.</p>

<p>I am struggling to have the next five result on the next line.</p>

<p><strong>My code</strong></p>

<pre><code>{% for number in numbers %}
  {%if not number|divisibleby:"6" %}
    &lt;span&gt;{{ number }}&lt;/span&gt;
  {% else %}
    &lt;div&gt;{{ number }}&lt;/div&gt;
    &lt;p&gt;&lt;/p&gt;
  {% endif %}
{% endfor %}
</code></pre>

<p><strong>The current result</strong></p>

<pre><code>1   2   3   4   5
6
7   8   9   10  11
12
13  14  15  16  17
18
19  20
</code></pre>

<p><strong>My expected result</strong> should look similar to</p>

<pre><code>1   2   3   4   5
6   7   8   9   10
11  12  13  14  15
16  17  18  19  20
</code></pre>