Should I use <br />
and
in HTML to position elements, or should I just use CSS display:inline with padding/margin for positioning and all styling? what are pros and cons with both?
Use <br>
to represent a linebreak inside a block element and use
to represent a non-breaking space inside an inline element. Nothing more. For the remnant just use CSS the smart way with help of under each the display
, float
, padding
and/or margin
properties.
<br />
has its uses, but if you find yourself using  
a lot, I would consider finding better ways to align things.
is just ugly and clunky.
If it's tabular data, use a table. Your life will be much happier.
If it's not tabular data, use css, as BalusC suggests.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With