"Button" tag vs. input type='button'

Although the tag has been around W3C for a while, Dreamweaver still creates buttons as "form buttons".


<input type="submit" name="button" id="button" value="Click Me">

The form input button creates generic browser buttons, and can be customized using css. However, an easier way to manage the styling of buttons on your site is to use the "button" tag.


<button type="button">Click Me!</button>

This allows a developer to create and use push buttons outside of FORMS in a manner that is better suited for site styling and flexibility.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Raymond Camden's Gravatar The HTML for this page is seriously borked. Looks like you need to escape some HTML.
# Posted By Raymond Camden | 11/6/08 3:26 PM
Henry Ho's Gravatar Oh, if anyone happens to use CFFORM, do not use <button> inside. The javascripts will be all messed up.
# Posted By Henry Ho | 11/6/08 8:00 PM
Tami's Gravatar Thanks Henry. I suppose I should clarify.... Henry is right, I am referring to those buttons you create outside of a form tag. I have not played with the css button in CFForm much, but will see if there is a workaround.
# Posted By Tami | 11/7/08 3:39 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.9.1.002. Contact HHWD