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. |
Content Model | The <br> element cannot contain any tags. |
Required | Tag Specific | Core | Focus | Events | Language |
---|---|---|---|---|---|
clear | id class style title |
Attribute | Description |
---|---|
clear | The 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> 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> Note: This attribute has been deprecated. |
id | The id attribute assigns a unique name to a tag. This allows style sheets or scripts to reference the tag. See id Example |
class | The 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 |
style | The 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 |
title | The 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 |
<br> tag example. <br> tag example using the clear attribute. |