You are here: Reference > HTML > attributes > clear (address, br, Hn, pre, ...)

clear attribute (address, br, Hn, pre, ...)

Browser support:
Specifies the position of the element in relation to floating objects.
This attribute is deprecated. Use the clear style property instead.
JavaScript page for this attribute: clear. You can find other example(s) there.

Possible values:

String that sets the position in relation to floating objects.
One of the following values:
all
The element will be placed below any floating objects.
left
The element be placed below any floating objects on the left side.
none
Allows floating content on all sides.
right
The element will be placed below any floating objects on the right side.
Default: this attribute has no default value.

Example HTML code 1:

This example illustrates the use of the clear attribute:
<img width="100px" height="100px" src="picture.gif" align="right" />
<br clear="left"/>
<h3>This text should be placed on the left side of the image.</h3>

<br/><br/><br/>

<img width="100px" height="100px" src="picture.gif" align="right" />
<br clear="right"/>
<h3>This text should be placed below the image.</h3>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content