Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
<!DOCTYPE html> <html> <head> <title>Buttons</title> <style> body { font-family: Arial; padding: 20px; } input { display: block; margin: 8px 0; padding: 8px; width: 200px; } button { margin: 4px; padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer; } .submit { background: #6366f1; color: white; } .reset { background: #e5e7eb; color: #111; } .action { background: #10b981; color: white; } </style> </head> <body> <form> <input type="text" placeholder="Name"> <input type="email" placeholder="Email"> <button type="submit" class="submit">Submit</button> <button type="reset" class="reset">Reset</button> <button type="button" class="action" onclick="alert('Hello!')">Say Hello</button> </form> </body> </html>
Result
Open