VOOZH about

URL: https://www.geeksforgeeks.org/html/html-input-width-attribute/

⇱ HTML <input> width Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML <input> width Attribute

Last Updated : 26 May, 2026

The width attribute is used to specify the width of an input element, mainly for image-type inputs. It helps control the displayed size of the image button.

  • Sets the width of an <input type="image"> element in pixels.
  • Helps adjust the size of image-based submit buttons.
  • Commonly used together with the height attribute for proper dimensions.

Syntax: 

<input width="pixels"> 

Attribute Values: It contains the value i.e pixels which specify the width of the input Element. 

Comment
Article Tags: