English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML: <input> height Eigenschaft

Die input height Eigenschaft legt die Höhe des <input>-Elements fest, die height Eigenschaft ist nur für <input type="image"> gültig.

 HTML <input> Tag

Online-Beispiel

Definiert das Bild als submit-Schaltfläche mit den Eigenschaften height und width in der Größe50 Pixel:

<!DOCTYPE html>
<html>
<head>
<title>HTML: <input> height Eigenschaft - Grundlegende Anleitungswiki(oldtoolbag.com)</title>
<body>
<form action="action_page.php">
  Erster Name: <input type="text" name="fname"><br>
  Letzter Name: <input type="text" name="lname"><br>
  <input type="image" src="img_submit.gif" alt="Submit" width="50" height="50">
</form>
</body>
</html>
Test it out ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the height attribute.

Definition and Usage

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

Note:The height attribute only applies to <input type="image">.

Tip:Always specify both the height and width attributes of the image. If height and width are set, the space required for the image is reserved when the page is loaded. However, if these attributes are not set, the browser will not know the size of the image and will not be able to reserve appropriate space for it. The effect is that the page layout will change during loading (when the image is loading).

HTML 4.01 from HTML5difference

The height attribute is an HTML5 as a new attribute of the <input> tag.

Syntax

<input height="pixels">

Attribute Value

ValueDescription
pixelsHeight in pixels (e.g. height="100").
 HTML <input> Tag