---
title: '{% comment %}'
description: used to comment out code.
date: '2026-08-02'
categories:
  - Template Tag
  - Utility
canonical: https://coolify.djangotemplatetagsandfilters.com/tags/comment/
doc_link: https://docs.djangoproject.com/en/6.0/ref/templates/builtins/#comment
---

# {% comment %}

used to comment out code.

## Documentation

Used to comment out code to prevent template tags or variables from being interpreted and/or to prevent the content from being delivered to the browser.

An optional note can be included in the open comment tag.

### Template

```django
{% comment "Should we include this?" %}
  <small class="text-muted">
    Created on: {{ joke.created }}
    Last updated: {{ joke.updated }}
  </small>
{% endcomment %}
```

Note that single lines of text can be commented out using `{#` and `#}`:

```django
{# This is a comment. #}
```
