---
title: '|first'
description: outputs the first element in a sequence.
date: '2026-08-02'
categories:
  - Filter
  - Data Structure
canonical: https://coolify.djangotemplatetagsandfilters.com/filters/first/
doc_link: https://docs.djangoproject.com/en/6.0/ref/templates/builtins/#first
---

# |first

outputs the first element in a sequence.

## Documentation

Outputs the first element in a sequence.

### Variable

```django
veggies = ['Tomatoes', 'Cucumbers', 'Peas']
```

### Template

```django
{{ veggies|first }}
```

### Result

```django
Tomatoes
```
