def _html_attrs_to_str(attrs):
    """Converts a dictionary of HTML attributes to its HTML representation.

    Args:
        attrs (dict): Attributes with values

    Returns:
        str: HTML attributes string ready to be used inside a HTML tag.
    """
    response = ''
    for name, value in attrs.items():
        response += name
        if value is not None:
            response += f'="{value}"'
        response += ' '
    return response.rstrip(' ')