A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/html/html-input-width-attribute/ below:

HTML | <input> width Attribute

HTML | <input> width Attribute

Last Updated : 12 May, 2021

The HTML <input> width Attribute is used to specify the width of the <input> element. This Attribute is only used for input type="image"


Syntax: 

<input width="pixels"> 


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

HTML
<!DOCTYPE html>
<html>
<body style="text-align:center;">

    <h1 style="color:green;">
            GeeksForGeeks
        </h1>

    <h2>HTML Input width Attribute</h2>
    <input id="myImage"
        type="image"
        src=
"https://media.geeksforgeeks.org/wp-content/uploads/gfg-40.png"
        alt="Submit"
        width="48"
        height="48" />

</body>

</html>                    

Output: 


Supported Browsers: 



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4