<br> Line Break (X)HTML Element Reference - (X)HTML webDev

<br> Line Breaks - 21 Lesser Known Semantic Elements

Because of the way HTML defines white space, it is not possible to control where lines of text break (such as marking up a postal address as a paragraph, but wanting the visual appearance to have each part of the address appear on a separate line) by simply pressing the Return key whilst writing the text.

A line break can be introduced into the document using the <br> element. However, this should only be used to force line breaks where they are required, and never to apply more vertical spacing between paragraphs or such in a document—that is more properly done with CSS.

Sometimes it might be easier to use the preformatted text block rather than inserting br elements. Or, if one particular part of some text is desired to be on a line by itself, but this is just a styling issue, it can be surrounded by a <span> element and set to display as a block level element.

So for example you could write the Opera contact address seen earlier in this article when talking about the address element like this instead:


						<p>Our company address: </p<
						<address<
						Opera Software ASA,<br<Waldemar Thranes gate 98,<br<
						NO-0175 OSLO,<br<NORWAY
						</address<
					

HTML Tag: <>

<>

HTML <> Element

The <>

<br> Element - Sitepoint

The <br> element’s purpose is very simple: it creates a line break within a block of text, leaving no padding or margins between the two blocks of text created by the line break. While it’s still perfectly valid to use this element in XHTML Strict pages (it’s not on the list of deprecated elements), you need to take care that you don’t misuse it, because:

There are some exceptional cases in which you might be forced to use a <br> element:

The <br> element is a self-closing element and doesn’t contain any content or values.

<br /> - 37 Steps To Perfect Markup

A line break (<br />) is mostly a presentational tool, and should be handled by CSS rather than HTML. However, there are a few cases where line breaks can be said to have semantic meaning, for instance in poetry, song lyrics, postal addresses and computer code samples. These can constitute legitimate uses for <br />, but using <br /> to separate paragraphs (<p>) is definitely an abuse of the <br /> element.

<br> Line Break (X)HTML Element Reference - (X)HTML webDev