HTML Buttons & Interaction
The button element is the core of web interactivity. While links navigate, buttons perform actions.
Type Attribute
The behavior of a button is controlled by its type attribute.
1. submit (default inside forms): Sends form data to the server.
2. reset: Clears all inputs in the form (rarely used now).
3. button: Does nothing by default. Used for JavaScript logic.
Disabled State
The disabled boolean attribute prevents user interaction. It is critical for UI feedback, such as preventing double submissions or waiting for validation.
Button vs Input
An <input type="button" /> is an older way to create buttons. The <button> tag is superior because it can contain nested HTML, like icons or bold text.
View Full Transcript+
This section contains the full detailed transcript of the video lessons for accessibility purposes and quick review. It covers the button syntax, the three types of button behaviors, and the usage of the disabled attribute.
