Web Hosts
with
Website Builders
Hosting trusted by almost 4 million sites!

Click to TRY FREE

Get a Website in Minutes at Web.com

HTML Code Tutorial

Tutor Ebook Download

Line Break Tag

The line break tag <br> forces a new line wherever it is placed on a page. It is useful for creating short lines of text, or for types of paragraphs like poems that need to be broken at specific intervals.

Example:
The rain in spain<br>
Falls Mainly<br>
On the plain.

The rain in spain
Falls Mainly
On the plain.

Clear Attribute

The line break tag has a virtually unknown attribute of clear="" The options are LEFT RIGHT ALL or NONE. The default is NONE which does nothing.

The clear attribute is used when text and inline images are placed on a page. Text that follows an image on a page will usually be placed beside of the image, even if the image is followed by a <br> tag.

When the attribute is added to a line break tag as,
<br clear="ALL"> and placed after an image ,text following the image will be displayed below it.

Example:
<p><img src="images/mellogo.gif" align="left" height="123" width="126" alt="" border="0">
<br clear="ALL">
This text would appear below the image, not beside it</p>


This text would appear below the image, not beside it

Note: When using this feature the the alignment attribute or float property (CSS) is required in the image tag.

Change the position of the clear All tag to:
<p><img src="images/mellogo.gif" align="left" height="123" width="126" alt="" border="0">
This text would appear beside the image.</p>
<br clear="ALL">
and the text would be placed beside the image.

This text would appear beside the image.



Left or Right

Though the same results can be achieved using the All property, choices of left and right are also available. Left causes text to flow to the left. Right causes text to flow to the right. The opposite image aligment is required for each.
<p STYLE="width : 30%"><img STYLE="float :right" src="images/mellogo.gif" height="123" width="126" alt="" border="0">
<br clear="left">
This text would appear to the left of the image.</p>


This text would appear to the left of the image.


Check out our Free Frames Template Kit or try our Free Frames Kit Demo



CGI Online
How to Create a Website -Tutorial
Main Website


This Free HTML Tutorial
is provided by Net Success 2000 Plus Inc.
PO Box 1508
Somerset, KY 42502
Last Modified: September 26, 2007

HTML Codes Tutor Ebook