asp.net.ph

Skip Navigation LinksHome > Abakada: Back to Basics > Language References > HTML Elements > INPUT type=image Element

<input type=image> Element


Creates a graphical submit button.HTML 2, 3.2, 4, 4.01, 5

HTML Syntax

Remarks

The input type=image element renders a submit button with an image. The value of the src attribute specifies the URI of the image that is used on the button. For accessibility reasons, authors should provide alternate text for the image via the alt attribute.

When a pointing device is used to click on the image, the form is submitted and the click coordinates passed to the server. The x value is measured in pixels from the left of the image, and the y value in pixels from the top of the image.

The x-coordinate is submitted under the name of the control with .x appended, and the y-coordinate is submitted under the name of the control with .y appended, as in name.x=x-value and name.y=y-value. Any value property is ignored. The image itself is specified by the src property, exactly as for the IMG element.

If the server takes different actions depending on the location clicked, users of non-graphical browsers will be disadvantaged. For this reason, authors should consider alternate approaches:

  • Use multiple submit buttons ( each with its own image ) in place of a single graphical submit button. Authors may use style sheets to control the positioning of these buttons.
  • Use a client-side image map together with scripting.

NOTE: Only the <input> start tag must be present. The element has no end tag.

Attributes

The <input_image> element supports the following attributes, in addition to global attributes and attributes common to all HTML input elements.

Example


<input type="image" src="../shared/go.gif" name="whatever"
   width=32 height=32 border=0 alt="Click me">
See Also

IMG   INPUT


Need a break ?
Suggested Reading

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph.

If you have any question, comment or suggestion,
please send us a note