Czn I still use <br> ??

TechBoyJK

Lifer
Oct 17, 2002
16,699
60
91
I'm building an Lucene based index for a search, and I want one of the columns to contain a textbody of data, and I need a line break to be included.

Is <br> still ok to use? I've read that it's deprecated, but I can't think of what else to use that doesn't make the code more complex than what could be achieved using a simple <br>
 

PhatoseAlpha

Platinum Member
Apr 10, 2005
2,131
21
81
Well, in the case of your question, it's very relevant. <br> is most definitely not depreciated in Html 4, or 5 for that matter.

Go ahead and use it.

Though, in many cases a <p> with proper margins would do just as well, I exepct.
 

Red Squirrel

No Lifer
May 24, 2003
69,220
13,001
126
www.anyf.ca
yeah br is ok. I prefer it over p since br gives a cleaner space. p is like a space and a half and acts all weird. br allows you to have a single space with text or other element right after, which in some cases is desired.
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
yeah br is ok. I prefer it over p since br gives a cleaner space. p is like a space and a half and acts all weird. br allows you to have a single space with text or other element right after, which in some cases is desired.

Then you need to apply styling to your <p> elements. You should be using <p> tags to store the majority of the content on your site. By using only a <br> you are 'emulating' a block element(albeit broken) and losing your ability to control the layout of those elements.

Just about the only time I'll use a <br> is if I have a long passage inside of a <p>, like a blog or news posting, that contains line breaks as part of the content.