How to make a line break without using <br> in <p>?

Hi there,

Anybody knows how to make a line break without using the <br> in a paragraph?
I have a paragraph that contains an office address and I want to break the office address into a few lines and each line should not have any spacing.

For example:

88 Phamton Park,
Glendale. 880099
Butterworth.

In the case of an address, you should be using the BR element, that’s precisely why the line break element exists.

Just because elements get abused every now and again (like BR) doesn’t mean you should avoid using them for their valid purpose. :slight_smile:

Thanks for your reply and really appreciate it.:slight_smile:

You could create an unordered list (UL) instead and style it in CSS.

Link

Except that an address isn’t an unordered list and so shouldn’t be coded as one.

If you were going to consider the lines in an address as a list it would have to be an ordered list since the order of the lines in an address has meaning. Not that I am suggesting that an address should be marked up as any sort of list.

Either using BR tags or the address microformat are the two most semantically correct ways of marking up an address.

You can’t argue with advice from pros!

Off Topic:

You can argue with advice from the “pros” if you want and I’d recommend to do so, if you know for certain they are talking poppycock as nobody is completely infallible.

Also I’d agree the ADDRESS may include the names of the document’s maintainers, links to the maintainers’ Web pages, e-mail addresses for feedback, postal addresses, phone numbers, and so on.

Though like was ‘correctly’ mentioned in this particular case the BR can be very useful in formatting addresses within the ADDRESS element.

I like to use a definition list for addresses.


<dl>
<dt>Address</dt>
<dd>1234 Anystreet</dd>
<dd>Anywhere, NY 04455</dd>
</dl>

Then, of course, you can style the definition list elements.