HTML <input> size Attribute specifies the visible width of an <input> element, typically for text input fields. It determines the width in terms of characters displayed, providing visual control over input size.
Syntax:
<input size="number">
Attribute values: It contains the numeric value which specifies the width of an input field in terms of the number of characters. Its default value is 20.
HTML <input> size Attribute Examples
Example: Here is the basic implementation of HTML <input> size Attribute.
<!DOCTYPE html>
<html>
<head>
<title>HTML input size Attribute</title>
</head>
<body>
<input type="text"
value="This is the default size.">
<br>
<br>
<input type="text"
size="50"
value="This is user specified size with value equals 50">
</body>
</html>