Hi
In another thread, someone found that applying style to a text input field affects all <input>s, be they text fields, submit buttons, radio buttons, checkboxes or hidden form fields. A while back, in response to problems like this, I changed all my
<input type="submit">Submit</input>
to
<button type="submit">Submit</button>
so I can style them seperately. I still have to explicitly class checkboxes, radios and hidden form items just so I can style the text fields cleanly but hey, it's one less.... also, I think it is a better semantic description of the element than an <input> tag, but I'm worried that there may be some problems with using this tag, seeing that almost all pages I look at use <input type="submit">
Does anyone else use or has tried <button>s? Is there any problems associated with them?
<button type='submit'> or <input type='submit'>?
Chris - from http://academ.hvcc.edu/~kantopet/ ...
The <button> tag allows you to perform most of the above [input] actions, the difference being that it provides greater flexibility. The <button> tag has an end tag, and any content between the tags becomes part of the button, i.e., clickable. The only content it cannot take is an imagemap. The <button> tag takes a type attribute that can have one of the three following values:
* <button type="submit">
* <button type="reset">
* <button type="button">
Other than that the button tag works like any other button.
Also, the W3C seems to think it's okay to use a button to submit a form. See > http://cita.rehab.uiuc.edu/wai-eval/show-test/index.php?test_id=91
<button type='submit'> or <input type='submit'>?
Excellent, cheers Roy. <button>s for me it is!