HTML CSS examples for HTML Tag:input
The alt attribute provides alternative information for user if user cannot view the image.
For <input> elements, the alt attribute can only be used with <input type="image">.
To create a tooltip for an image, use the title attribute!
Value | Description |
---|---|
text | Specifies the alternate text for the area, if the image cannot be displayed |
An HTML form with an image that represents the submit button:
<!DOCTYPE html> <html> <body> <form action="/action_page.php"> First name: <input type="text" name="fname"><br> <input type="image" src="submit.gif" alt="Submit" width="48" height="48"> </form><!--from w ww . j a v a 2s. com--> </body> </html>