---
title: 'Liquid tags: break'
description: Stops the rest of a file from rendering.
source_url:
  html: 'https://shopify.dev/docs/api/liquid/tags/theme-break'
  md: 'https://shopify.dev/docs/api/liquid/tags/theme-break.md'
api_name: liquid
---

# break

Stops the rest of a file from rendering.

Outside of a loop, `break` stops the rest of the current file from rendering, which you can use as an early return. Output that was already rendered is kept.

[Sections](https://shopify.dev/docs/storefronts/themes/architecture/sections), [theme blocks](https://shopify.dev/docs/storefronts/themes/architecture/blocks/theme-blocks), and snippets rendered with the [`render` tag](https://shopify.dev/docs/api/liquid/tags/render) each render in their own context, so only the file that contains the tag stops. The file that rendered it, and the rest of the page, are unaffected.

***

**Caution:** A snippet rendered with the deprecated \<a href="/docs/api/liquid/tags/include">\<code>include\</code> tag\</a> shares the context of the file that included it, so a \<code>break\</code> in that snippet also stops the rest of the including file.

***

***

**Note:** Inside a \<a href="/docs/api/liquid/tags/for">\<code>for\</code> loop\</a> or \<a href="/docs/api/liquid/tags/tablerow">\<code>tablerow\</code> loop\</a>, \<code>break\</code> stops the loop instead of the file. To learn more, refer to \<a href="/docs/api/liquid/tags/break">\<code>break\</code>\</a>.

***

## Syntax

```oobleckTag
{% break %}
```

This example is a [theme block](https://shopify.dev/docs/storefronts/themes/architecture/blocks/theme-blocks) that renders breadcrumbs. Because it's rendered on the home page, the tag returns early and the block outputs nothing.

##### Code

```liquid
{%- if template.name == 'index' -%}
  {%- break -%}
{%- endif -%}

<nav aria-label="Breadcrumbs">
  <a href="{{ routes.root_url }}">Home</a>
  <span aria-hidden="true">/</span>
  <span>{{ page_title }}</span>
</nav>
```

##### Data

```json
{
  "template": "index"
}
```
