Horizontal alignment

By using the horizontal alignment, you can align an image either to the right or left of the page. If your image is smaller than the current line, text adjacent to the image will automatically wrap to the next line. See figure 2 as an example.

Figure 2 Effects of Horizontal Align Property
HTML This is an example of left alignment. With align set to left, image is placed on the left hand side and the text wraps on the right hand side.
HTML This is an example of right alignment. With align set to right, image is placed on the right hand side and the text wraps on the left hand side.
HTML This is an example of left alignment with wrapping feature stopped.
When wrapping is turned off, any additional text on the page continues at the bottom of the image.

Table 2 lists the necessary code to produce the output shown in figure 2. Notice with horizontal alignment, the text can be wrapped on left or right. In the first example, the image is placed on the left hand side while the text wraps on the right hand side. In example two we have the exact opposite: the image is on the right hand side and the text wraps on the left hand side. The last example shows how to turn off wrapping with <br clear="left">. IF you do not turn off wrapping, your text will continue to wrap as long as there is avialble space. Note if you were using right alignment, you would use <br clear="right"> because the value of the clear must match to the alignment value for this to work correctly. If you decide that you want to place the image in the center of the page and around the image, you may want to consider using a table.

Table 2 HTML Code for the output shown in Figure 2
<img src="http://www.scriptingmaster.com/images/html/HTML.gif" width="133" height="36" align="left"> This is an example of left alignment. With align set to left, image is placed on the left hand side and the text wraps on the right hand side.
<img src="http://www.scriptingmaster.com/images/html/HTML.gif" width="133" height="36" align="right"> This is an example of right alignment. With align set to right, image is placed on the right hand side and the text wraps on the left hand side.
<img src="http://www.scriptingmaster.com/images/html/HTML.gif" width="133" height="36" align="left">left alignment with wrapping feature stopped. <br clear="left"> When wrapping is turned off, any additional text on the page continues at the bottom of the image.