Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a general rule of thumb for multiple <br /> tags?

Tags:

html

css

php

I have a webpage run on php with a few tables, input boxes, and a form. The design is pretty basic but, I use various <br /> tags when needed. Sometimes I may have two or three in a row so the spacing looks better.

Is there a rule of thumb on what to do when one uses multiple <br /> tags? Do most people just append them on the same line of code, or have each <br /> tag on its own line?

like image 238
Ray J Tong Avatar asked Nov 28 '22 17:11

Ray J Tong


1 Answers

Instead of adding extra HTML, it is widely accepted that the better approach be to separate content from presentation by using CSS to add space (for example padding or margin) between elements instead of <br/> tags.

like image 74
andyb Avatar answered Jan 22 '23 22:01

andyb