Tags make up the programming logic that tells templates what to do. Tags are wrapped in {% %}.

{% if user.fullname == 'Dave Bowman' %}
  Hello, Dave.
{% endif %}

Whitespace Control

Normally Liquid renders everything outside of variable and tag blocks verbatim, with all the whitespace as-is. Occasionally you don't want the extra whitespace, but you still want to format the template cleanly, which requires whitespace.

You can tell the engine to strip all leading or trailing whitespace by adding a hyphen (-) to the start or end block tag.

{% for i in (1..5) -%}
{{ i }}
{%- endfor %}