import re


def flatten_html(body: str) -> str:
    """
    Remove whitespace around html element tags.
    """
    # remove whitespace after html tags
    flat = re.sub(r"\>\s+", ">", body)
    # remove whitespace before html tags
    flat = re.sub(r"\s+\<", "<", flat)
    return flat