Repeated HTML.BR() Tag


I have a question. I found myself using the html.Br() tag repeatedly and I tried these two functions with the hope of calling the function when i need to repeat the tag but none worked.

def make_break(num_breaks):

br_list = list(itertools.repeat(html.Br(), num_breaks))

return br_list

make_break(2) returned [Br(None), Br(None)]

I also tried this:

def make_break(num_breaks):

br_list = [html.Br()]*num_breaks

return br_list

make_break(2) returned [Br(None), Br(None)] . Same output as the first function.

Any idea how I can solve the issue.

Thank you.


Could you provide us one example of how you are using this function in your application layout? The problem might be simply that you have nested lists as a children prop.


thank you. You are right.

I was calling the function this way causing a nested list inside the div tag.

app.layout = html.Div([



It worked after I removed the outer list in this manner below;

app.layout = html.Div(



thank you