# Prefer assign Over capture

`assign` is lighter weight than `capture` for simple values. Reserve `capture` for multi-line HTML blocks.

```liquid
{% comment %} BAD: capture for a simple value {% endcomment %}
{% capture product_class %}product-card{% endcapture %}

{% comment %} GOOD: assign for simple values {% endcomment %}
{% assign product_class = 'product-card' %}

{% comment %} OK: capture for multi-line HTML {% endcomment %}
{% capture card_content %}
  <h3>{{ product.title }}</h3>
  <p>{{ product.price | money }}</p>
{% endcapture %}
```
