CSS Button Generator
Design a button visually: colours, rounded corners, padding, font, border, shadow and hover effect. See it live and copy clean CSS and HTML for your website or landing page.
How to use the button generator
- Type the button text, using an action like Book a free demo.
- Pick colours, corners, padding and font.
- Choose a hover effect and check the contrast warning.
- Copy the CSS and HTML into your site. In WordPress, add the CSS under Appearance, Customize, Additional CSS.
What makes a button get clicked
| Do | Avoid |
|---|---|
| Clear action text | Vague words like Submit or Click here |
| Strong contrast with the background | Pale buttons that blend in |
| At least 44 px tall on mobile | Tiny buttons that are hard to tap |
| One main button per section | Several buttons competing |
Accessibility built in
The code includes a visible focus style for keyboard users and a contrast check based on WCAG guidance. Use a real link (a) for navigation and a button element for actions like opening a form.
Related tools
Pick colours with the color palette generator, check contrast with the color contrast checker, write button text with the CTA generator, and add a background with the CSS gradient generator.
More free tools and guides
Practise tools like this on real projects in our digital marketing course in Faridabad, with weekday, weekend and online batches.
See the courseAll free toolsAsk on WhatsAppFrequently Asked Questions
Is this CSS button generator free?
Yes. It is free with no sign-up and works in your browser.
How do I use the button in Elementor?
Add the CSS to Site Settings, Custom CSS, or Additional CSS, then use an HTML widget with the button code, or add the class btn-custom to a button widget.
What size should a button be on mobile?
At least about 44 to 48 pixels tall, with enough space around it.
Should I use a link or a button tag?
Use a link for going to another page and a button for actions on the same page.