< Previous | HTML 4.01 Tags / XHTML 1.0 Elements | Next >
Free XHTML 1.0 Class | HTML Validators | Free HTML 4.01 Class
<br /> Description:
The <br /> tag defines a forced line break within an XHTML document.
<br /> Web Browser Support:
- AvantGo Palm OS
- AvantGo Windows CE
- Firefox 1, 2
- Internet Explorer 2, 3, 4, 5, 6, 7
- Mozilla 1
- Netscape 2, 3, 4, 6, 7, 8
- Opera 3, 4, 5, 6, 7, 8, 9
- Safari 1, 2
- WebTV / MSNTV
- HTML 3.2, 4.0
- XHTML 1.0
Text Module, Legacy Module
<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.
View
<br />
And this text is on the second line. - line breaks beside an aligned image
<img src=about_logo.gif" style="width:137px; height:48px; border: none; float: left;" alt="About.com" />
View
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.
<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:
- Using the P and BR Elements
- Line Breaks and Paragraphs
- Making Spaces
- Use the clear CSS property instead
< Previous | HTML 4.01 Tags / XHTML 1.0 Elements | Next >
Free XHTML 1.0 Class | HTML Validators | Free HTML 4.01 Class

