Lesson 7 of 55
HTMLButton Controls – Submit, Reset, Button
7 min
Course progress13%
What you'll learn
Keep these ideas in mind as you work through the lesson.
Lesson 7 of 55
HTML7 min
Keep these ideas in mind as you work through the lesson.
<button type='submit'>Send</button>
<button type='reset'>Clear</button>
<button type='button' onclick='alert("Clicked")'>Custom</button>
type='submit' – Triggers form submission. If the button lives outside a <form>, you can target a form with the form attribute.type='reset' – Resets all controls to their initial values (defined by the value attribute or the default).type='button' – Generic button; you attach JavaScript behaviour (e.g., opening a modal).<button> vs. <input><button> can contain HTML (icons, multiline text) which is useful for richer UI.<input type='submit'> is limited to plain text but is slightly shorter to write.<button> when you need an icon (e.g., <button><svg>…</svg> Save</button>).aria-label).disabled attribute to indicate when a button cannot be used; style the disabled state for visual clarity.type attribute present and correct? ✅aria-label provided? ✅disabled attribute used where appropriate? ✅Tip: In a form, prefer
<button type='submit'>over<input type='submit'>if you need an icon or multiline label.