English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
HTML: <input> size-Eigenschaft
Online-Beispiel11eine HTML-Formular, das zwei Eingabefelder enthält, deren Breite sich wie folgt verteilen:6und
Beispiel <!DOCTYPE html> <html> <head> - <title>HTML: <input> size-Eigenschaft3codebox.com)</title> <body> <form action="action_page.php"> Handynummer: <input type="text" name="email" size="11><br> Postleitzahlennummer <input type="text" name="code" maxlength="6" size="6><br> <input type="submit" value="Submit"> </form> </html>Test it out ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the size attribute.
The size attribute specifies the visible width of the <input> element (in characters).
Note:The size attribute applies to the following input types: text, search, tel, url, email, and password.
Tip:To specify the maximum number of allowed characters in the <input> element, use maxlength Attribute.
None.
<input size="number">
Value | Description |
---|---|
number | Specify the width of the <input> element in terms of characters. The default value is 20. |