def folder_contents_html(folder_path, files, folders):
    """Given files and folders generate html."""
    html = "<!DOCTYPE html><html><body>{}</body></html>"
    atag = '<a href="{}">{}</a>'
    files_and_folders = ''
    for folder in folders:
        files_and_folders += '<h4>' + atag.format(folder_path + '/' + folder, folder) + '</h4>'
    for file_name in files:
        files_and_folders += '<h4>' + atag.format(folder_path + '/' + file_name, file_name) + '</h4>'
    return html.format(files_and_folders)