HTMLInputElement: size property - Web APIs | MDN

Value

An integer.

Examples

js

const inputElement = document.getElementById("password");
console.log(inputElement.size);
inputElement.size = 12;

Specifications

Specification
HTML
# dom-input-size

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.