Is it considered bad style to use <br>? I have a text element that I would like to break up into two lines, is there a more recommended way to do this or a different element I should use?
Is it considered bad style to use <br> ? I have a text element
Share
The question you need to ask is, why do you need to break up the line?
If it’s to make it fit in a space,
you need to use CSS to set word
wrapping and width values.
If it’s because they are distinct
paragraphs, use the
<p>tag.If it’s because you need to show a
visually distinct sample of
something, set
display: blockwithCSS.
Otherwise, it might be okay. What’s the reason for the break?
You want to be as semantically correct as possible, and you want to separate presentation from content.