HTML < button > Tag - Learn About Website | DaddyFile

0

HTML <button> Tag

Example

A clickable button is marked up as follows:

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

Definition and Usage

The <button> tag defines a clickable button.
Inside a <button> element you can put content, like text or images. This is the difference between this element and buttons created with the <input> element.
Tip: Always specify the type attribute for a <button> element. Different browsers use different default types for the <button> element.


Tips and Notes

Note: If you use the <button> element in an HTML form, different browsers may submit different values. Use <input> to create buttons in an HTML form.

Differences Between HTML 4.01 and HTML5

HTML5 has the following new attributes: autofocus, form, formaction, formenctype, formmethod, formnovalidate, and formtarget.

Post a Comment

 
Top