In newspapers and magazines a popular design technique is to embed or insert images in the text columns in a way that makes the text flow around them. The image can be inset to the right or left, with text flowing around to the left or right of the image, respectively.
To inset an image, simply place the image tag on the line where it is to appear in the paragraph of text, and add the 'align="right"' or 'align="left"' attribute as appropriate.
| Web page: | Markup: |
|
This document illustrates the simplest way to inset an image, without going into more sophisticated techniques utilizing advanced XHTML and CSS. |
<p><img align="right" src="i/usa-flag.gif" |
Giving the image dimensions in the source allows the browser to reserve space for the image while it downloads, preventing the annoying tendency for text to move around on the page as the visitor is reading.
In practice, this technique only works in HTML "Loose" or "Transitional" documents, not XHTML "Strict". In Strict, you must use CSS positioning and place the image tag within a <div> element. (See "CSS Positioning".)
<< Resizing and Thumbnailing Images | Index | Transparent GIFs >>