Ryan's District Boards

Computer, programming, and webmaster help , support , tips and tricks => Tutorials Zone! => Internet webmaster computer programming technology tips and tricks => HTML Tutorials => Topic started by: ben2ong2 on October 03, 2006, 06:17:06 PM

Title: HTML - Aligning text and objects around images
Post by: ben2ong2 on October 03, 2006, 06:17:06 PM
The ALIGN attribute of <IMG> tag helps in aligning other elements like text with respect to the image. It can take any of the following values:

TOP: Aligns the image to the top of adjoining object.
MIDDLE: Aligns the text baseline to the middle of the image.
BOTTOM: Text baseline is aligned to the bottom of the image. This is the default value.
LEFT and RIGHT: Image is aligned right of left with text wrapping around it.
ABSMIDDLE, ABSBOTTOM and BASELINE Aligns the image with respect to the middle, bottom or baseline of the text.
TEXTTOP: Aligns the image top with respect to the ascenders of the text. This attribute value is Netscape specific.
CENTER: works same as ALIGN="MIDDLE".
However, a situation might arise when you would like to place only some text, say, a small description, on the left or right side of the image with the rest to flow after the image.