Horje

How to add HTML <input> width Attribute

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



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


Related Articles
What is HTML <!--...--> Tag HTML Tag
What is HTML <!DOCTYPE> Declaration HTML Tag
What is HTML Elements and Doctypes HTML Tag
What is HTML <a> Tag HTML Tag
What is HTML <abbr> Tag HTML Tag
What is HTML <acronym> Tag HTML Tag
What is HTML <address> Tag HTML Tag
What is HTML <applet> Tag HTML Tag
What is HTML <area> Tag HTML Tag
What is HTML <article> Tag HTML Tag
What is HTML <aside> Tag HTML Tag
What is HTML <audio> Tag HTML Tag
What is HTML <b> Tag HTML Tag
What is HTML <base> Tag HTML Tag
What is HTML <basefont> Tag HTML Tag
What is HTML <bdi> Tag HTML Tag
What is HTML <bdo> Tag HTML Tag
What is HTML <big> Tag HTML Tag
What is HTML <blockquote> Tag HTML Tag
What is HTML <body> Tag HTML Tag
What is HTML <br> Tag HTML Tag
What is HTML <button> Tag HTML Tag
What is HTML <canvas> Tag HTML Tag
What is HTML <caption> Tag HTML Tag
What is HTML <center> Tag HTML Tag
What is HTML <cite> Tag HTML Tag
What is HTML <code> Tag HTML Tag
What is HTML <col> Tag HTML Tag
How to create HTML <colgroup> Tag HTML Tag
What is HTML <data> Tag HTML Tag
What is HTML <datalist> Tag HTML Tag
What is HTML <dd> Tag HTML Tag
What is HTML <del> Tag HTML Tag
What is HTML <details> Tag HTML Tag
What is HTML <dfn> Tag HTML Tag
What is HTML <dialog> Tag HTML Tag
What is HTML <dir> Tag HTML Tag
What is HTML <div> Tag HTML Tag
What is HTML <dl> Tag HTML Tag
What is HTML <dt> Tag HTML Tag
What is HTML <em> Tag HTML Tag
What is HTML <embed> Tag HTML Tag
What is HTML <fieldset> Tag HTML Tag
What is HTML <figcaption> Tag HTML Tag
What is HTML <figure> Tag HTML Tag
What is HTML <font> Tag HTML Tag
What is HTML <footer> Tag HTML Tag
What is HTML <form> Tag HTML Tag
What is HTML <frame> Tag HTML Tag
What is HTML <frameset> Tag HTML Tag
What is HTML <h1> to <h6> Tags HTML Tag
What is HTML <head> Tag HTML Tag
What is HTML <header> Tag HTML Tag
What is HTML <hgroup> Tag HTML Tag
What is HTML <hr> Tag HTML Tag
What is HTML <html> Tag HTML Tag
What is HTML <i> Tag HTML Tag
What is HTML <iframe> Tag HTML Tag
What is HTML <img> Tag HTML Tag
What is HTML <input> Tag HTML Tag
What is HTML <ins> Tag HTML Tag
What is HTML <kbd> Tag HTML Tag
What is HTML <label> Tag HTML Tag
What is HTML <legend> Tag HTML Tag
What is HTML <li> Tag HTML Tag
What is HTML <link> Tag HTML Tag
What is HTML <main> Tag HTML Tag
What is HTML <map> Tag HTML Tag
What is HTML <mark> Tag HTML Tag
What is HTML <menu> Tag HTML Tag
What is HTML <meta> Tag HTML Tag
What is HTML <meter> Tag HTML Tag
What is HTML <nav> Tag HTML Tag
What is HTML <noframes> Tag HTML Tag
What is HTML <noscript> Tag HTML Tag
What is HTML <object> Tag HTML Tag
What is HTML <ol> Tag HTML Tag
What is HTML <optgroup> Tag HTML Tag
What is HTML <option> Tag HTML Tag
What is HTML <output> Tag HTML Tag
What is HTML <p> Tag HTML Tag
What is HTML <param> Tag HTML Tag
What is HTML <picture> Tag HTML Tag
What is HTML <pre> Tag HTML Tag
What is HTML <progress> Tag HTML Tag
What is HTML <q> Tag HTML Tag
What is HTML <rp> Tag HTML Tag
What is HTML <rt> Tag HTML Tag
What is HTML <ruby> Tag HTML Tag
What is HTML <s> Tag HTML Tag
What is HTML <samp> Tag HTML Tag
What is HTML <script> Tag HTML Tag
What is HTML <search> Tag HTML Tag
What is HTML <section> Tag HTML Tag
What is HTML <select> Tag HTML Tag
What is HTML <small> Tag HTML Tag
What is HTML <source> Tag HTML Tag
What is HTML <span> Tag HTML Tag
What is HTML <strike> Tag HTML Tag
What is HTML <strong> Tag HTML Tag
What is HTML <style> Tag HTML Tag
What is HTML <sub> Tag HTML Tag
What is HTML <summary> Tag HTML Tag
What is HTML <sup> Tag HTML Tag
What is HTML <svg> Tag HTML Tag
What is HTML <table> Tag HTML Tag
What is HTML <tbody> Tag HTML Tag
What is HTML <td> Tag HTML Tag
What is HTML <template> Tag HTML Tag
What is HTML <textarea> Tag HTML Tag
What is HTML <tfoot> Tag HTML Tag
What is HTML <th> Tag HTML Tag
What is HTML <thead> Tag HTML Tag
What is HTML <time> Tag HTML Tag
What is HTML <title> Tag HTML Tag
What is HTML <tr> Tag HTML Tag
What is HTML <track> Tag HTML Tag
What is HTML <tt> Tag HTML Tag
What is HTML <u> Tag HTML Tag
What is HTML <ul> Tag HTML Tag
What is HTML <var> Tag HTML Tag
What is HTML <video> Tag HTML Tag
How to add HTML <wbr> Tag HTML Tag

Type:
Html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin



Share on: