Image alignment, placement, and sizing

The align, placement, width, and height attributes of the image element are used to specify the placement and size of images when generated to an output delivery format.

The placement of the image on the output page or screen is defined in the placement and align attributes. The placement attribute can be set to inline (placing the image inline with the text in the paragraph in which it is placed) or break (placing the image in its own block, with space above and below it). The align attribute has valid values of left, right, center and current. These values specify how the image will be aligned on the page or screen. The align attribute only has an effect if the placement is set to break.

To display the image in its own block, use the image element independently of a paragraph element, set the placement attribute to break, and the alignment to left, right, or center.

To display an image within a paragraph or other block element, set the placement attribute to inline, and either omit the align attribute or set it to current (to inherit the alignment settings of the element in which the image is contained).

The image element includes height and width attributes. These attributes are used to store the intended display height and width of the image in the output, expressed in one of a variety of units, including pixels (px), centimetres (cm), points (pt) and inches (in).