This is an archive of an inactive wiki and cannot be modified.

When inserting an image in your pages you should always define the width and height parameters using the appropriate attributes for the img tag.

Defining the image size will help the browser to allocate the appropriate space in the page and will make the rendering easier and more fluent. In the unlucky event that the image is broken or that the browser does not support the used format, the page will still appear as the author wanted it to look like with a blank spot.

Also refer to CategoryBpNontextAlternatives for techniques to make sure that the original intent of the page is respected and that the user has a clear idea of the contents of the page.

Technique

<img src="http://example.com/images/logo.gif" alt="Company Logo" width="100" height="50" />

There is a special type of image that is an exception to this rule. Vector graphics is made to fit the screen at best. In these cases you might want to use measures relative to the screen size and not integers.

Technique

<img src="http://example.com/images/logo.svg" alt="Company Logo" width="100%" height="70%" />

CategoryXhtml CategoryBpImagesSpecifySize

Contributions to this wiki are governed by the W3C policies for Contribution to W3C' wiki on Mobile Web.