Twig Templating If statement (Unexpected tag name error) Sorry if this is a really obvious question, I'm new to Twig and Craft. I'm getting the following error: 
Unexpected tag name "offset" (expecting closing tag for the "if" tag defined near line 54)

Can anyone tell me what is wrong with my code?

&lt;div class="box alt container"&gt;
{% set offset = true %}
{% if offset %}
&lt;section class="feature left"&gt;
    {% set caseHero = entry.heroImage.first() %}
    &lt;a href="#" class="image icon fa-signal"&gt;&lt;img src='{{caseHero.url}}' alt="" /&gt;&lt;/a&gt;
    &lt;div class="content"&gt;
        &lt;h3&gt;{{entry.title}}&lt;/h3&gt;
        &lt;p&gt;{{entry.description}}&lt;/p&gt;
    &lt;/div&gt;
&lt;/section&gt;
    {% offset = false %}
{% else %}
&lt;section class="feature left"&gt;
    {% set caseHero = entry.heroImage.first() %}
    &lt;a href="#" class="image icon fa-signal"&gt;&lt;img src='{{caseHero.url}}' alt="" /&gt;&lt;/a&gt;
    &lt;div class="content"&gt;
        &lt;h3&gt;{{entry.title}}&lt;/h3&gt;
        &lt;p&gt;{{entry.description}}&lt;/p&gt;
    &lt;/div&gt;
&lt;/section&gt;
    {% offset = true %}
{% endif %}
It seems like you want to set offset to false after your first section.

To do this correctly you would need to use set like this:

{% set offset = false %}


Checkout the documentation to set a variable