def render_tag(tag, attrs=None, content=None, close=True):
    """
    Render a HTML tag
    """
    builder = "<{tag}{attrs}>{content}"
    if content or close:
        builder += "</{tag}>"
    return format_html(
        builder,
        tag=tag,
        attrs=mark_safe(flatatt(attrs)) if attrs else "",
        content=text_value(content),
    )
Render a HTML tag