Home »
Python »
Django MCQs
Which Django tag is used to write comments?
24. Which Django tag is used to write comments?
- {% startcomment %} ... {% endcomment %}
- {% comment %} ... {% endcomment %}
- {% initcomment %} ... {% endcomment %}
- {% start %} ... {% end %}
Answer: B) {% comment %} ... {% endcomment %}
Explanation:
The Django tag comment is used to write comment. Here is the syntax of comment tag -
{% comment %} ... {% endcomment %}
Example:
<h1>My page</h1>
{% comment %}
<h1>Hello, world!</h1>
{% endcomment %}