for

Iterate through items in an array or collection to generate repeating HTML lists and components.

Syntax

{% for item in array %} ... {% endfor %}

Example

{% assign tags = "Fast,Secure,Reliable" | split: "," %}{% for tag in tags %}[{{ tag }}]{% endfor %}

Output

[Fast][Secure][Reliable]

The for tag loops over elements in an array or collection, repeating its enclosing block for each item. Inside the loop, the special forloop object provides access to iteration metadata including index and length properties.

On programmatic SEO pages, for loops transform delimited CSV cell values into structured lists or schema markup. For example: {% assign highlights = row.features | split: ';' %}<ul>{% for item in highlights %}<li>{{ item | strip }}</li>{% endfor %}</ul>. This produces semantically rich HTML lists from tabular data.

Try this syntax in the editor.