HTML <input> with align Attribute

You are Here:

HTML <input> with align Attribute

The align attribute specifies the alignment of the <input> tag.

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

Warning: The align attribute is deprecated and is no longer recommended.

Tips: To align an <input> element whose type="image", try any of the following methods:

  • Using style global attribute: <input style="float: right">.
  • Using CSS float property.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <form action="/user-name.php"> Name: <input type="text" name="name"> <input type="image" src="submit.png" alt="Submit" align="right"> </form> </body> </html>

Attribute Values

NameExplanation
leftSpecifies the image should align left.
rightSpecifies the image should align right.
topSpecifies the image should align top.
middleSpecifies the image should align middle.
bottomSpecifies the image should align bottom.

Reminder

Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in HTML.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author