1. Computing

Discuss in my forum

<br />

By , About.com Guide

<br /> Description:

The <br /> tag defines a forced line break within an XHTML document.

<br /> Web Browser Support:

<br /> Attributes:

All attributes are optional unless indicated.

<br /> End Tag:

None. <br /> is a singleton tag.

<br /> Contents:

None.

<br /> Valid Context:

The <br /> tag is valid within the following tags:
a, abbr, acronym, address, applet, b, bdo, big, blockquote, body, button, caption, center, cite, code, dd, del, dfn, div, dt, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, i, iframe, ins, kbd, label, legend, li, noframes, noscript, object, p, pres q, s, samp, small, span, strike, strong, sub, sup, td, th, tt, u, var

<br /> Usage:

  • standard line break:
     This text is on the first line.
     <br />
     And this text is on the second line.
    View
  • line breaks beside an aligned image
    <img src=about_logo.gif" style="width:137px; height:48px; border: none; float: left;" alt="About.com" />
     This text will be to the right of the image.<br />
     This will be too.<br clear="left" />
     And this text will be below the image.
    View

<br /> Special Notes:

  • Match the "clear" attribute to the "float" attribute in the image or other aligned element.
  • The most commonly used "clear" attribute is "all", as it guarantees that your content will be below all aligned elements.
  • Sometimes authors may want to prevent a line break from occurring between two words. The   (non-breaking space) entity acts as a space where browsers should not cause a line break.

More <br /> Information:

©2013 About.com. All rights reserved.