Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

HTML Basics: Using Images : Page 4

Learn how to put graphics and photos into your page.


advertisement
Using the Break Tag with Images

<br clear=left/right/all>

When working with images, you sometimes want the text to follow below the image rather than run alongside the image. The break tag <br> lets you do this.



Usually the break tag stands on its own without any attributes. However, the tag does offer one attribute, clear.

Clear tells the browser to display the content which follows it below the lowest part of the image. By following an image tag with a break tag that has a value in the clear attribute, you ensure that the text that follows the graphic appears underneath the graphic rather than beside it.

The clear attribute has three possible values:

  1. clear=left tells the browser to look to the leftmost side of the page and drop the text below the item there.
  2. clear=right tells the browser to look to the rightmost side of the page and drop the text below the item there.
  3. clear=all tells the browser to look to all across the page and drop the text below the lowest item on either side.

The first graphic in the following example does not have a break tag. The second one uses the break tag with the clear attribute value set to all, <br clear=all>.

world logoThe planet Earth is a small blue sphere, but one we hold dear. That much is clear!

 

world logo
The planet Earth is a small blue sphere, but one we hold dear. That much is clear!



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date