• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Czn I still use <br> ??

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>
 
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.
 
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.
 
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.
 
Back
Top