Sandee Lembke

How To Wrap Text Around Image



Posted: Tuesday, November 17, 2009

by
Theme Party Queen.com

One of the most challenging things that a new webmaster has to learn when building webpages is how to wrap an image around text.

The most common problems include text creeping too close to images and images not being aligned properly both horizontally and vertically when placed next to text.

Always Start With The Same Image Code

Get in the habit of using the same HTML image code every single time you place an image. That way all you have to do is alter it for the page that you are working on. The code should include:


When you want to wrap an image around text, decide which side of the page the image or ad should appear. If you want it on the right side use ALIGN="right". Other choices are "left" or "center".

Next, adjust Hspace to gain space between the text and the image. Start with Hspace="10" and adjust as needed. Vspace is not as commonly used as Hspace but it comes in handy when you want to move an image up or down vertically. Start with "10" and adjust as needed.

Using ALIGN, HSPACE and VSPACE are the primary wrap text code needed when you want to wrap an image around text.

Using The Break Tag

Occasionally you will want to create space between the bottom of your image and where the text begins again. Using the break tag will accomplish this task. The most common break tag for this purpose is clear="all."

Other Parts of HTML Image Code

The Alt tag is extremely important. Using a keyword-rich alt tag will help search engines find your images and also your site. The Title tag is only needed if you want your visitors to see an image description when they hover over your images.

Specifying an image height and width will ensure that your images display properly, without distortion, in all browsers.

Lastly, adjust the border tag depending on what type of border you would like around your images. You can adjust weight (1 px is thin, 3 px is thicker), color and type (solid, dotted...). If you want no border, change border code to 0px.

Summary

Visit Free-Website-Tutorials.com where you can watch a Video Tutorial showing all of the steps above on How to Wrap Text Around Images.

Get the exact HTML wrap code needed to get it right the first time.


This Article has been viewed 523 times. (Not updated in real-time.)
Top-level comments on this article: (2 total)
» left by kash
1 year 277 days ago.
Dear Sandee, thank you for sharing this information here. I find it resourceful and helpful, especially as i was searching for a way to wrap text around an image.
 
kash
» left by Anonymous 1 year 240 days ago.
Excellent. Very helpful! Adding sample code to this will help more.
We want your comments! If you can read this, you don't have javascript enabled, so you can't use this comment system. Please enable javascript.