Friday, 30 December 2011

HTML5 - height and width Attributes

height and width Attributes

The height and width attributes specifies the height and width of the image used for the input type image.
Note: The height and width attributes only works with <input> type: image.

Syntax

<input type="image" src="img_type.gif" width="40" height="50" /> 

Example

  <!DOCTYPE html>
<html>
<body>

<form action="demo_form.asp" method="get">
User name: <input type="text" name="user_name" /><br />
<input type="image" src="img_submit.gif" width="24" height="24" />
</form>

</body>
</html>


No comments:

Post a Comment