{% if component.tag %}
    {% if component.html %}
        <{{ component.tag }} {{ component.get_attr_text|safe }}>
            {{ component.html|safe }}
        </{{ component.tag }}>
    {% else %}
        <{{ component.tag }} {{ component.get_attr_text|safe }}/>
    {% endif %}
{% else %}
    {% if component.css_id %}
        <div id="{{ component.css_id }}">
    {% endif %}

    {{ component.html|safe }}

    {% if component.css_id %}
        </div>
    {% endif %}
{% endif %}