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

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML: <input> align-Eigenschaft

Die Eigenschaft "align" des Elements <input> wird nur mit <input type ="image"> verwendet und bestimmt die Ausrichtung des Bild-Inputs basierend auf den umliegenden Elementen.

 HTML <input> Tag

Online-Beispiel

HTML-Formular mit Bild als Submit-Button. Der Submit-Button ist linksbündig:

<!DOCTYPE 	html>
<html>
<head>
<title>HTML:<input> align-Eigenschaft - Grundtutorials.net(oldtoolbag.com)</title>
<body>
<form 	action="action_page.php">
  First 	name: 	<input 	typ="text" 	name="fname"><br>
  <input 	typ="image" 	src="submit.gif" 	alt="Submit" 	align="left" 	width="48"	höhe="48">
</form>
</body>
</html>
Testen Sie, ob ‹/›

Browserkompatibilität

IEFirefoxOperaChromeSafari

Hinweis:In allen Hauptbrowsern funktionieren nur die Werte "left" und "right" der Eigenschaft "align" normal.

Definition and Usage

HTML5 The align attribute of <input> is not supported. Please use CSS instead.

In HTML 4.01 In the <input> align attribute is deprecated.

The align attribute can only be used with <input type="image">, it specifies the alignment of the image input relative to other elements around it.

Compatibility Notes

In HTML 4.01 In the <input> align attribute is deprecated. Please use CSS instead.

CSS Syntax: <input type="image" style="float:right">

CSS Example: Align Input Image

In our CSS tutorial, you can find more about float Attributedetails.

Syntax

<input align="left|right|middle|top|bottom">

Attribute Value

ValueDescription
leftAlign image to the left (default).
rightAlign object to the right.
topAlign image upwards.
middleAlign image centrally.
bottomAlign image downwards.
 HTML <input> Tag