Your host:
Stephen Chapman
Stephen Chapman

Line breaks

Under normal circumstances there should be no need to insert line breaks into your web page. The web browser should be able to follow any instructions provided via your stylesheet to determine where and when to start a new line when displaying output on the screen. Most of the uses for line breaks in earlier versions of HTML have been replaced with stylesheet commands for specifying white-space settings and margins and padding.

The only time that line breaks need to be inserted in XHTML are where there absolutely must be a line break at a particular position. Two examples of where this would be the case are with poetry and computer code. In each of these cases the linebreak is a significant part of the actual content and not just a part of the page formatting.

Where such line breaks are a requirement of the content they can be easily inserted using the <br /> tag.

Note that the line break self closing. When used to provide content specific line breaks like this there should be no need to apply any stylesheet overrides to the default settings for this tag and so if you find such settings necessary you are probably misusing this tag to apply formatting rather than for its intended purpose. Therefore while there are a few attributes that can be added to a line break tag you should never need to use any of them.

go to top

Add to del.icio.us

Personal Loans - Loans - Internet Marketing - Credit Card Consolidation