Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML | <input> size Attribute

  • Last Updated : 14 Dec, 2021

The HTML <input> size Attribute is used to specify the visible width in terms of characters of an <input> element. It works with many input fields such as text, search, tel, URL, email, and password.


<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.


<!DOCTYPE html>
    <title>HTML input size Attribute</title>
    <h1 style="color: green;"
            HTML input size Attribute 
    <input type="text" 
           value="This is the default size.">
    <input type="text" 
           value= "This is user specified size 
     with value equals 50">


Supported Browsers: The browser supported by HTML input size Attribute are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!