What will be the HTML output of this Liquid code? ⬇️ ```liquid <div> {%- if product.available -%} In stock! {%- endif -%} </div> ```

### Explanation The {%- -%} syntax removes whitespace around the tag. Key points: - Without hyphens (standard {% %}): ```liquid
{% if product.available %} In stock! {% endif %}
In stock!
``` - With hyphens on both sides ({%- -%}): ```liquid
{%- if product.available -%} In stock! {%- endif -%}
In stock!
``` Reference: [Shopify Liquid Whitespace Control](https://shopify.dev/docs/api/liquid/basics/whitespace)

Answer Options:

  • <div>-In stock!-</div>
  • <div>In stock!</div>
  • <div> In stock! </div>
  • <div> In stock! </div>
Shopify Free Test
← PreviousQuestion 1 of 1Finish →
00
← PreviousFinish →
Copyright ©Michael Bollin. Found some mistake?[email protected]