input height Attribute - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:input

Description

The height attribute specifies the height of the <input> element.

The height attribute is used only with <input type="image">.

Attribute Values

Value Description
pixels The height in pixels (e.g. height="100")

The following code shows how to Define an image as the submit button, with height and width attributes:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<form action="/action_page.php">
  First name: <input type="text" name="fname"><br>
  Last name: <input type="text" name="lname"><br>
  <input type="image" src="img_submit.gif" alt="Submit" width="48" height="48">
</form><!--from   w ww.  ja va  2s.c  o  m-->

</body>
</html>

Related Tutorials