HTML CSS examples for HTML Tag:input
The width attribute specifies the width of the <input> element.
The width attribute is used only with <input type="image">.
Value | Description |
---|---|
pixels | The width in pixels (e.g. width="100") |
The following code shows how to Define an image as the submit button, with height and width attributes:
<!DOCTYPE html> <html> <body> <form action="/action_page.php"> First name: <input type="text" name="fname"><br> Last name: <input type="text" name="lname"><br> <input type="image" src="img_submit.gif" alt="Submit" width="48" height="48"> </form><!--from w ww .j a v a 2 s. com--> </body> </html>