input
element buttonsinput
element with the type
attribute is used to create various button types. The value
attribute may be used with the Submit, Reset and Button type buttons to create the text written on the button. In the absence of the value
attribute, the default text for the button type is used. Remember that the input
element only requires the <input>
start tag (end tag is omitted).input
element button types are outlined below:input
element with the type="submit"
attribute-value pair.<input type="submit" value="Submit Information">
input
element with the type="reset"
attribute-value pair.<input type="reset" value="Reset form">
input
element with the type="file"
attribute-value pair. <input type="file">
value
attribute for the File button type applies to the initial file name instead of the button text. The button text in this instance is defined by the browser displaying the web page. Internet Explorer and Mozilla will display "Browse...". Opera will display "Choose".input
element with the type="image"
attribute-value pair. The src="graphic file name"
attribute-value pair specifies the graphic to be used where graphic file name
equals the file name of the image you wish to use to create the button. (See Graphics 1 - The Essentials for more information about using graphics on web pages.) The value
attribute is inapplicable.<input type="image" src="button.jpg">
onclick
event handler to activate a javascript.<input type="button" value="Open new window" onclick="window.open('test.htm','test');">
button
element buttonsinput
element and the button
element to create buttons are:
button
element may be used to create the submit, reset and button type buttons only.button
element requires both start and end tags, e.g. <button>...</button>
button
element may actually contain other HTML elements offering you many more options on how to format your button. This includes bold, italicised, colored and resized text, images, tables and more.<button type="submit"><b><i>Submit Info</i></b></button>
<button type="reset"><font face="times new roman" size="4" color="green">Reset All Form <br>Components</font></button>
<button type="button" onclick="window.open('test.htm');">
<table cellpadding="5" cellspacing="0" border="0">
<tr><td colspan="2">Open a new window</td></tr>
<tr><td><img src="point-right.gif"></td>
<td><img src="new-window.gif"></td></tr>
</table></button>
Free Text Editors
Free Graphics Editors
Website Analysis Tools
Free Website Templates
See also:
If you need a .COM web address, you can get one quick and easy at...
<~ BACK | TOP | NEXT ~> |