`<span> .. </span>` here should encapsulate the `{% if .. %} .. {% endif %}` block, including the "beta".