Horje
How to add HTML <input> width Attribute | HTML Code

Define an image as the submit button, with height and width attributes.

Definition and Usage

The width attribute specifies the width of the <input> element.

Note: The width attribute is used only with <input type="image">.

Tip: Always specify both the height and width attributes for images. If height and width are set, the space required for the image is reserved when the page is loaded. However, without these attributes, the browser does not know the size of the image, and cannot reserve the appropriate space to it. The effect will be that the page layout will change during loading (while the images load).


Browser Support

The numbers in the table specify the first browser version that fully supports the attribute.


index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The input height and width attributes</h1>

<form action="/action_page.php">
  <label for="fname">First name:</label>
  <input type="text" id="fname" name="fname"><br><br>
  <label for="lname">Last name:</label>
  <input type="text" id="lname" name="lname"><br><br>
  <input type="image" src="https://horje.com/uploads/demo/2024-03-26-04-36-33-img_submit.gif" alt="Submit" width="48" height="48">
</form>

<p><b>Note:</b> The input type="image" sends the X and Y coordinates of the click that activated the image button.</p>

</body>
</html>

Output should be:

How to add HTML <input> width Attribute




Read Full::
HTML Tag Code
Category:
HTML Code
Sub Category:
HTML Tag Code
Uploaded:
1 month ago
Uploaded by:
Admin
Views:
3

Related Articles
How to add HTML <input> Tag
How to add HTML <input> accept Attribute
How to add HTML <input> accept file_extension Attribute
How to add HTML <input> accept audio/* Attribute
How to add HTML <input> accept video/* Attribute
How to add HTML <input> accept image/* Attribute
How to add HTML <input> accept media_type Attribute
How to add HTML <input> alt Attribute
How to add HTML <input> autocomplete Attribute
How to add HTML <input> autocomplete on Attribute
How to add HTML <input> autocomplete off Attribute
How to add HTML <input> autocomplete address-line1 Attribute
How to add HTML <input> autocomplete address-line2 Attribute
How to add HTML <input> autocomplete address-line3 Attribute
How to add HTML <input> autocomplete address-level1 Attribute
How to add HTML <input> autocomplete address-level2 Attribute
How to add HTML <input> autocomplete address-level3 Attribute
How to add HTML <input> autocomplete address-line4 Attribute
How to add HTML <input> autocomplete street-address Attribute
How to add HTML <input> autocomplete country Attribute
How to add HTML <input> autocomplete country-name Attribute
How to add HTML <input> autocomplete postal-code Attribute
How to add HTML <input> autocomplete name Attribute
How to add HTML <input> autocomplete additional-name Attribute
How to add HTML <input> autocomplete family-name Attribute
How to add HTML <input> autocomplete give-name Attribute
How to add HTML <input> autocomplete honoric-prefix Attribute
How to add HTML <input> autocomplete name Attribute
How to add HTML <input> autocomplete nickname Attribute
How to add HTML <input> autocomplete organization-title Attribute
How to add HTML <input> autocomplete username Attribute
How to add HTML <input> autocomplete new-password Attribute
How to add HTML <input> autocomplete new-password Attribute
How to add HTML <input> autocomplete current-password Attribute
How to add HTML <input> autocomplete bday Attribute
How to add HTML <input> autocomplete bday-day Attribute
How to add HTML <input> autocomplete bday-month Attribute
How to add HTML <input> autocomplete bday-year Attribute
How to add HTML <input> autocomplete sex Attribute
How to add HTML <input> autocomplete one-time-code Attribute
How to add HTML <input> autocomplete organization Attribute
How to add HTML <input> autocomplete cc-name Attribute
How to add HTML <input> autocomplete cc-given-name Attribute
How to add HTML <input> autocomplete cc-additional-name Attribute
How to add HTML <input> autocomplete cc-family-name Attribute
How to add HTML <input> autocomplete cc-number Attribute
How to add HTML <input> autocomplete cc-exp Attribute
How to add HTML <input> autocomplete cc-exp-month Attribute
How to add HTML <input> autocomplete cc-exp-year Attribute
How to add HTML <input> autocomplete cc-csc Attribute
How to add HTML <input> autocomplete cc-type Attribute
How to add HTML <input> autocomplete transaction-currency Attribute
How to add HTML <input> autocomplete transaction-amount Attribute
How to add HTML <input> autocomplete language Attribute
How to add HTML <input> autocomplete url Attribute
How to add HTML <input> autocomplete email Attribute
How to add HTML <input> autocomplete photo Attribute
How to add HTML <input> autocomplete tel Attribute
How to add HTML <input> autocomplete tel-country-code Attribute
How to add HTML <input> autocomplete tel-national Attribute
How to add HTML <input> autocomplete tel-area-code Attribute
How to add HTML <input> autocomplete tel-local Attribute
How to add HTML <input> autocomplete tel-local-prefix Attribute
How to add HTML <input> autocomplete tel-local-suffix Attribute
How to add HTML <input> autocomplete tel-extension Attribute
How to add HTML <input> autocomplete impp Attribute
How to add HTML <input> autofocus Attribute
How to add HTML <input> checked Attribute
How to add HTML <input> dirname Attribute
How to add HTML <input> disabled Attribute
How to add HTML <input> form Attribute
How to add HTML <input> formaction Attribute
How to add HTML <input> formenctype Attribute
How to add HTML <input> formmethod Attribute
How to add HTML <input> formmethod get Attribute
How to add HTML <input> formmethod post Attribute
How to add HTML <input> formnovalidate Attribute
How to add HTML <input> formtarget Attribute
How to add HTML <input> formtarget _blank Attribute
How to add HTML <input> formtarget _self Attribute
How to add HTML <input> formtarget _parent Attribute
How to add HTML <input> formtarget _top Attribute
How to add HTML <input> formtarget framename Attribute
How to set HTML <input> height Attribute
How to set HTML <input> list Attribute
How to add HTML <input> max Attribute
How to add HTML <input> max number Attribute
How to add HTML <input> max date Attribute
How to add HTML <input> maxlength Attribute
How to add HTML <input> min Attribute
How to add HTML <input> min number Attribute
How to add HTML <input> min date Attribute
How to add HTML <input> minlength Attribute
How to add HTML <input> multiple Attribute
How to add HTML <input> name Attribute
How to add HTML <input> pattern Attribute
How to add HTML <input> pattern Specific characters Attribute
How to add HTML <input> pattern uppercase and lowercase letter Attribute
How to add HTML <input> pattern characters @,.;''#$%^&8 Attribute
How to add HTML <input> pattern characters [^'\x22]+
How to add HTML <input> pattern characters http:// or https://
How to add HTML <input> placeholder Attribute
How to add HTML <input> popovertarget Attribute
How to add HTML <input> popovertargetaction Attribute
How to add HTML <input> popovertargetaction hide Attribute
How to add HTML <input> popovertargetaction show Attribute
How to add HTML <input> popovertargetaction toggle Attribute
How to add HTML <input> readonly Attribute
How to add HTML <input> required Attribute
How to add HTML <input> size Attribute
How to add HTML <input> src Attribute
How to add HTML <input> step Attribute
How to add HTML <input> type Attribute
How to add HTML <input> type button Attribute
How to add HTML <input> type checkbox Attribute
How to add HTML <input> type color Attribute
How to add HTML <input> type date Attribute
How to add HTML <input> type datetime-local Attribute
How to add HTML <input> type email Attribute
How to add HTML <input> type file Attribute
How to add HTML <input> type hidden Attribute
How to add HTML <input> type image Attribute
How to add HTML <input> type month Attribute
How to add HTML <input> type number Attribute
How to add HTML <input> type password Attribute
How to add HTML <input> type radio Attribute
How to add HTML <input> type range Attribute
How to add HTML <input> type reset Attribute
How to add HTML <input> type search Attribute
How to add HTML <input> type submit Attribute
How to add HTML <input> type tel Attribute
How to add HTML <input> type text Attribute
How to add HTML <input> type time Attribute
How to add HTML <input> type url Attribute
How to add HTML <input> type week Attribute
How to add HTML <input type="button">
How to add HTML <input type="checkbox">
How to add HTML <input type="color">
How to add HTML <input type="date">
How to add HTML <input type="datetime-local">
How to add HTML <input type="email">
How to add HTML <input type="file">
How to add HTML <input type="hidden">
How to add HTML <input type="image">
How to add Align input image (with CSS) on Submit Button
How to add HTML <input type="month">
How to add HTML <input type="number">
How to add HTML <input type="password">
How to add HTML <input type="radio">
How to add HTML <input type="range">
How to add HTML <input type="reset">
How to add HTML <input type="search">
How to add HTML <input type="submit">
How to add HTML <input type="tel">
How to add HTML <input type="text">
How to add HTML <input type="time">
How to add HTML <input type="url">
How to add HTML <input type="week">
How to add HTML <input> value Attribute
How to add HTML <input> width Attribute

More Articles
What is HTML <!--...--> Tag HTML Tag Code
What is HTML <!DOCTYPE> Declaration HTML Tag Code
What is HTML Elements and Doctypes HTML Tag Code
What is HTML <a> Tag HTML Tag Code
What is HTML <abbr> Tag HTML Tag Code
What is HTML <address> Tag HTML Tag Code
What is HTML <applet> Tag HTML Tag Code
What is HTML <area> Tag HTML Tag Code
What is HTML <article> Tag HTML Tag Code
What is HTML <aside> Tag HTML Tag Code
What is HTML <audio> Tag HTML Tag Code
What is HTML <b> Tag HTML Tag Code
What is HTML <base> Tag HTML Tag Code
What is HTML <basefont> Tag HTML Tag Code
What is HTML <bdi> Tag HTML Tag Code
What is HTML <bdo> Tag HTML Tag Code
What is HTML <big> Tag HTML Tag Code
What is HTML <blockquote> Tag HTML Tag Code
What is HTML <body> Tag HTML Tag Code
What is HTML <br> Tag HTML Tag Code
What is HTML <button> Tag HTML Tag Code
What is HTML <canvas> Tag HTML Tag Code
What is HTML <caption> Tag HTML Tag Code
What is HTML <center> Tag HTML Tag Code
What is HTML <cite> Tag HTML Tag Code
What is HTML <code> Tag HTML Tag Code
What is HTML <col> Tag HTML Tag Code
How to create HTML <colgroup> Tag HTML Tag Code
What is HTML <data> Tag HTML Tag Code
What is HTML <datalist> Tag HTML Tag Code
What is HTML <dd> Tag HTML Tag Code
What is HTML <del> Tag HTML Tag Code
What is HTML <details> Tag HTML Tag Code
What is HTML <dfn> Tag HTML Tag Code
What is HTML <dialog> Tag HTML Tag Code
What is HTML <dir> Tag HTML Tag Code
What is HTML <div> Tag HTML Tag Code
What is HTML <dl> Tag HTML Tag Code
What is HTML <dt> Tag HTML Tag Code
What is HTML <em> Tag HTML Tag Code
What is HTML <embed> Tag HTML Tag Code
What is HTML <fieldset> Tag HTML Tag Code
What is HTML <figcaption> Tag HTML Tag Code
What is HTML <figure> Tag HTML Tag Code
What is HTML <font> Tag HTML Tag Code
What is HTML <footer> Tag HTML Tag Code
What is HTML <form> Tag HTML Tag Code
What is HTML <frame> Tag HTML Tag Code
What is HTML <frameset> Tag HTML Tag Code
What is HTML <h1> to <h6> Tags HTML Tag Code
What is HTML <head> Tag HTML Tag Code
What is HTML <header> Tag HTML Tag Code
What is HTML <hgroup> Tag HTML Tag Code
What is HTML <hr> Tag HTML Tag Code
What is HTML <html> Tag HTML Tag Code
What is HTML <i> Tag HTML Tag Code
What is HTML <iframe> Tag HTML Tag Code
What is HTML <img> Tag HTML Tag Code
What is HTML <input> Tag HTML Tag Code
What is HTML <ins> Tag HTML Tag Code
What is HTML <kbd> Tag HTML Tag Code
What is HTML <label> Tag HTML Tag Code

Share on: