def tag(name, content, options=None, lf_open=False, lf_close=False):
    """creates a HTML stub with closed tags of type <name> around <content>
    with additional <options::dict> in the opening tag
    when lf_(open|close)==True, the respective tag will be appended with a line feed.
    returns: html stub as list"""

    if lf_open:
        lf_open_str = "\n"
    else:
        lf_open_str = ""
    if lf_close:
        lf_close_str = "\n"
    else:
        lf_close_str = ""

    option_str = ""
    if options:
        option_list = [" "]
        for option in options:
            option_list.extend([option, '="', str(options[option]), '" '])

        option_str = "".join(option_list)

    stub = ["<{}{}>{}".format(name, option_str, lf_open_str)]
    if type(content) == list:
        stub.extend(content)
    else:
        stub.append(content)

    stub.append("</{}>{}".format(name, lf_close_str))

    return stub