# Use {% liquid %} for Multi-Statement Logic

Group multiple Liquid statements in a single `{% liquid %}` block instead of individual `{%- %}` tags.

```liquid
{% comment %} BAD: individual tags add noise {% endcomment %}
{%- assign title_tag = 'h2' -%}
{%- assign preload = false -%}
{%- if section.index0 == 0 -%}
  {%- assign title_tag = 'h1' -%}
  {%- assign preload = true -%}
{%- endif -%}

{% comment %} GOOD: liquid block for multi-statement logic {% endcomment %}
{% liquid
  assign title_tag = 'h2'
  assign preload = false
  if section.index0 == 0
    assign title_tag = 'h1'
    assign preload = true
  endif
%}
```

Use `{% liquid %}` when a block has two or more statements. Each statement goes on its own line without `{%` or `%}` delimiters. The block produces no whitespace.

## Output from inside a `{% liquid %}` block

`{{ ... }}` output syntax is not available inside `{% liquid %}`. Use `echo` instead:

```liquid
{% liquid
  assign title = section.settings.title | escape
  assign level = 'h2'
  if section.index0 == 0
    assign level = 'h1'
  endif
  echo '<' | append: level | append: '>' | append: title | append: '</' | append: level | append: '>'
%}
```

`echo` accepts filter chains exactly like `{{ }}` does — keep heavy string-building logic inside the `{% liquid %}` block rather than splitting back out to output tags.
