</> Code Corner

HTML · HTML Tutorial · Lesson 24

HTML Buttons

Clickable buttons with <button>.

The <button> element defines a clickable button.

Example

<button type="button" onclick="alert('Hello world!')">Click Me!</button>

Button Types

type Behavior
button A plain button that does nothing by default
submit Submits a form (default inside a form)
reset Resets all form fields

Keep reading “HTML Buttons”

Sign up to read the full lesson (3 more parts), try every example in the live editor, and take the 5-question quiz.

Chat with us 👋