Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest self-service freelancing marketplace for people like you.

HTML <input> height Attribute

The height attribute on an <input> tag sets the height of the image input element.

The height is specified in pixels - without the ‘px‘ unit.

Example

#

An <input> element of type image with a height attribute.






<form action="/tutorial/action.html">
  <label for="firstname">First name</label><br />
  <input type="text" id="firstname" name="firstname"><br />
  <label for="lastname">Last name</label><br />
  <input type="text" id="lastname" name="lastname"><br /><br />

  <input type="image" src="/img/html/arrow.png" height="40" alt="Submit">
</form>

Using height

The height attribute specifies the height of the input element.

This attribute only applies to <input> elements of type image.

The height is specified in pixels -- without the 'px' unit.

Percentages (%) are not allowed, but most browsers do support it.


Syntax

<input type="image" height="pixels">

Values

#

Value Description
pixels Height of the image in the input element in pixels.

Browser support

Here is when height support started for each browser:

Chrome
1.0 Sep 2008
Firefox
16.0 Oct 2012
IE/Edge
1.0 Aug 1995
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like

 Back to <input>
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest self-service freelancing marketplace for people like you.

Guides