I would like to comment this with a line:
{% if something.property %}
<table>
<tr>...
{% # this is a comment %}
{% if something.property %}
<table>
<tr>...
As answer by Miles, {% comment %}...{% endcomment %} is used for multi-line comments, but you can also comment out text on the same line like this:
{# some text #}
{% extends "file.html" %} tag you should put that on the very top of the template file even before the {% comment %}...{% endcomment %}, otherwise you'll get an <ExtendsNode: extends "file.html"> must be the first tag in the template error. I am saying that in case someone wants to place the multi-line comments on the top of the template.Comment tags are documented at https://docs.djangoproject.com/en/stable/ref/templates/builtins/#std:templatetag-comment
{% comment %} this is a comment {% endcomment %}
Single line comments are documented at https://docs.djangoproject.com/en/stable/topics/templates/#comments
{# this won't be rendered #}
This is single-line comments:
{# <p>This is comment</p> #}
This is multi-line comments:
{% comment "This is an optional note for comments" %}
<p>This is comment</p>
<p>This is comment</p>
<p>This is comment</p>
{% endcomment %}