Little Web Hut

HTML 4.01 and XHTML 1.0 Reference: <br> Tag

HTML <br> Tag - Line Break
Syntax HTML syntax - This element does not require a closing tag.
<br>

XHTML syntax - This element is opened and closed, within a single tag, by adding a space followed by a forward slash at the end of the tag.
<br />
Usage The <br> tag is used to force a line break.

HTML <br> tag example.
<p>This is before the br tag.<br>This is after the br tag.</p>
Test It HTML Style

XHTML <br> tag example.
<p>This is before the br tag.<br />This is after the br tag.</p>
Test It XHTML Style

Content Model The <br> element cannot contain any tags.

Red attributes have been deprecated
<br> Tag Attribute Summary
Required Tag Specific Core Focus Events Language
  clear id class style title      

Red attributes have been deprecated
<br> Tag Attributes
Attribute Description
clearThe clear attribute specifies where the new line should start. Valid values are none, left, right, or all. The default value is none which causes the new line to start below the current line. Using a value of left will cause the new line to start below images or objects floated on the left. Using a value of right will cause the new line to start below images or objects floated on the right. Using the value all will cause the new line to start below images and objects floated on the left and right.

HTML <br> tag example using the clear attribute.
<p>
<img src="shapes.gif" alt="shapes" align="left">
</p>
<p>This is before the br tag.<br>This is after 
the br tag.<br clear="left">
This is after the br tag using the clear attribute.</p>
Test It HTML Style

XHTML <br> tag example using the clear attribute.
<p>
<img src="shapes.gif" alt="shapes" align="left" />
</p>
<p>This is before the br tag.<br />This is after 
the br tag.<br clear="left" />
This is after the br tag using the clear attribute.</p>
Test It XHTML Style


Note: This attribute has been deprecated.
idThe id attribute assigns a unique name to a tag. This allows style sheets or scripts to reference the tag. See id Example
classThe class attribute assigns a class name to a tag. The class name does not need to be unique. More than one tag can have the same class name. This allows style sheets or scripts to reference multiple tags with a single class name. See class Example
styleThe style attribute specifies styles for the tag. For Cascading Style Sheets (CSS), the syntax is name:value. Each name:value pair is separated by semicolons. See style Example
titleThe title attribute specifies additional information about the tag. It is common for browsers to display the title when the pointing device stops over the object. See title Example

HTML <br> Tag Examples
Test It HTML StyleTest It HTML Style<br> tag example.
Test It HTML StyleTest It HTML Style<br> tag example using the clear attribute.