HTML Button Generator
Configure a `<button>` element — type, text, class, onclick, aria-label, and more — and get ready-to-paste HTML with a live preview.
Last updated: May 21, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is HTML Button Generator?
The HTML `<button>` element creates a clickable button. Unlike `<input type="button">`, the button element can contain HTML child content, making it more flexible. The `type` attribute is important: `submit` submits a form, `reset` clears form fields, and `button` does nothing by default (requires JavaScript).
This generator covers all standard button attributes including the `disabled` state, inline styles, click handlers, and the `aria-label` attribute for accessibility.
How to Use HTML Button Generator
Enter the button text
Select the type (button, submit, or reset)
Add id, class, name, or value if needed
Add an onclick handler or inline style if required
Set aria-label for accessibility
Toggle disabled if needed
Copy the generated HTML
Common Use Cases
- Developers quickly generating button markup to paste into HTML templates.
- Form authors who need submit or reset buttons with specific attributes.
- Developers adding onclick handlers who want the correct attribute syntax.
- Teams ensuring all buttons have aria-label attributes for accessibility.
Example Input and Output
A primary submit button with class and aria-label.
Text: Submit Form
Type: submit
Class: btn-primary
aria-label: Submit the contact form<button type="submit" class="btn-primary" aria-label="Submit the contact form">Submit Form</button>Privacy
All HTML generation runs in your browser. No data is sent to any server.

