+ 1

Is it not recommended to use many <br> element in HTML?

Can anyone explain why it is not recommended?

19th Aug 2021, 5:01 AM
Anush Ananyan
Anush Ananyan - avatar
3 Answers
+ 4
I got this for you from stackoverflow "The main reason for not using <br> is that it's not semantic. If you want two items in different visual blocks, you probably want them in different logical blocks. In most cases this means just using different elements, for example <p>Stuff</p><p>Other stuff</p> , and then using CSS to space the blocks out properly." full answer and other answers - https://stackoverflow.com/questions/1726073/is-it-sometimes-bad-to-use-br#:~:text=The%20main%20reason%20for%20not,space%20the%20blocks%20out%20properly.
19th Aug 2021, 5:12 AM
Abhiyantā
Abhiyantā - avatar
+ 4
Yes, if you think if using br tag, just try to use div tag that embrace the paragraph or block. div tag would define the element more semantic way, while br tag is forcing the element to have break point at the end
19th Aug 2021, 5:25 AM
CalviŐ˛
CalviŐ˛ - avatar