HTML
CSS
JavaScript
jQuery
PHP
SQL
WordPress
- Tags: Link
- Categories: HTML Attributes, HTML Reference, Reference
Last Updated on September 24, 2022
Quick Reference
The button
tag defines a clickable button. There are multiple attributes that can be applied to the button
tag.
Attribute | Value | Description |
---|---|---|
autofocus | autofocus | Specifies that a button should automatically get focus when the page loads |
disabled | disabled | Specifies that a button should be disabled |
form | form_id | Specifies which form the button belongs to |
formaction | URL | Specifies where to send the form-data when a form is submitted (only for type=”submit”) |
formenctype | application/x-www-form-urlencoded multipart/form-data text/plain | Specifies how form-data should be encoded before sending it to a server (only for type=”submit”) |
formmethod | get post | Specifies how to send the form-data (only for type=”submit”) |
formnovalidate | formnovalidate | Specifies that the form-data should not be validated on submission (only for type=”submit”) |
formtarget | _blank _self _parent _top framename | Specifies where to display the response after submitting the form (only for type=”submit”) |
name | name | Specifies a name for the button |
type | button reset submit | Specifies the type of button |
value | text | Specifies an initial value for the button |
We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.
HTML
CSS
JavaScript
jQuery
PHP
SQL
WordPress
Why 1SMARTchicken?
This site was built and is maintained to benefit my autistic son.
See More →
See More →
Thanks for your support!
HTML Books
All are affiliate links. Thank you for your support!
HTML NOTES:
- In our HTML section the term “tag” and “element” are often used interchangeably to refer to both the tag used to create a page element and the element created by the tag (
p
tag =p
element = paragraph on the page) - HTML5 is not case sensitive; so
P
is the same asp
,ÂH1
is the same ash1
- Global attributes can be used with all HTML tags and are therefore not mentioned on every tag page
- To write clean, readable HTML code, it is best to use indentation whereas elements within elements are indented (tabbed or spaces) to create something that looks like a project outline
- The browser will automatically remove any extra spaces and lines in your HTML code when the page is displayed
- Double quotes or single quotes can be used around HTML attribute values, but when the attribute value itself contains one form of quote, it will be necessary to use the other around the attribute
Feedback
If you see an error on the page or the code itself is incorrect or incomplete, or just plain wrong, please let us know. We’re always learning. NOTE: we do not sell your information and will not send you spam emails.