# what does {%- -%} mean

**URL:** <https://community.hubspot.com/t/what-does-mean/77309>\
**Category:** CMS Development\
**Tags:** starter\
**Created:** [March 16, 2023, 10:24am UTC](https://community.hubspot.com/t/what-does-mean/77309 "2023-03-16T10:24:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonp](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/simonp/32/60590_2.png) [@simonp](https://community.hubspot.com/u/simonp)\
**Post date:** [March 16, 2023, 10:24am UTC](https://community.hubspot.com/t/what-does-mean/77309/1 "2023-03-16T10:24:51Z")

</div>

This is fairly straight forward question. I 've encounterd the folllowing several time I know {% %} is a statement delimiter

what does the following mean

{% - -%}

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [March 16, 2023, 10:42am UTC](https://community.hubspot.com/t/what-does-mean/77309/2 "2023-03-16T10:42:10Z")

</div>

Hi @simonp,

the “minus” shortens the blank space before/after the statement.

```lia-code-sample
{%- : deletes the blank/space before the statement

-%} : deletes the blank/space after the statement

```

If you’re in a CSS or HTML file, enable the rendered preview and see the difference.

This info is quite hidden. You can find it in the [macro documentation](https://developers.hubspot.com/docs/cms/hubl/variables-macros-syntax#macros).

Hope this helps,

best,

Anton

---

<div class="post-metadata">

**Author:** ![himanshurauthan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/himanshurauthan/32/53076_2.png) [@himanshurauthan](https://community.hubspot.com/u/himanshurauthan)\
**Post date:** [March 16, 2023, 10:45am UTC](https://community.hubspot.com/t/what-does-mean/77309/3 "2023-03-16T10:45:01Z")

</div>

Hello @simonp

the syntax {%- -%} is also used to control whitespace in the rendered output of HubSpot’s templating language, HubL.

Similar to other template engines, {%- -%} tells HubL to strip any whitespace that immediately precedes or follows the enclosed expression, tag or block.

For example, consider the following HubL code:

```lia-code-sample
{% for item in items %}
 <li>{{ item }}</li>
{% endfor %}

```

This will render a list of items, but it will also include whitespace before and after the `{% for %}` and `{% endfor %}` statements, which may result in unwanted line breaks or indentation in the final output.

To remove this extra whitespace, you can use the `{%- -%}` syntax like this:

```lia-code-sample
{%- for item in items -%}
 <li>{{ item }}</li>
{%- endfor -%}

```

This will ensure that there is no whitespace before or after the `for` loop statement, resulting in a cleaner rendered output.
