Attribute: Height & Width

The height and width attributes specify the height and width of an <input> element. These attributes are only used with <input type="image">. Always specify the size of images. If the browser does not know the size, the page will flicker while images load.

This example defines an image as the submit button, with height and width attributes:

HTML file: Displayed by browser:
<p><input type="image" src="../html_beg/images/submit.gif" alt="Submit" width="48" height="48"></p>

This should work with all major browsers.

Back button Table of Contents Next button