Advertisement
Guest User

HTML Contact Form Code

a guest
Feb 20th, 2023
1,888
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Contact Form</title>
  5. <style>
  6. form {
  7. width: 400px;
  8. margin: 0 auto;
  9. padding: 20px;
  10. background-color: #f5f5f5;
  11. border: 1px solid #ccc;
  12. border-radius: 5px;
  13. }
  14. label, input, textarea {
  15. display: block;
  16. margin-bottom: 10px;
  17. width: 100%;
  18. border-radius: 5px;
  19. padding: 10px;
  20. border: 1px solid #ccc;
  21. font-size: 16px;
  22. }
  23. input[type="submit"] {
  24. background-color: #4CAF50;
  25. color: white;
  26. padding: 10px 20px;
  27. border: none;
  28. border-radius: 5px;
  29. cursor: pointer;
  30. }
  31. input[type="submit"]:hover {
  32. background-color: #3e8e41;
  33. }
  34. </style>
  35. </head>
  36. <body>
  37. <form action="#" method="post">
  38. <fieldset>
  39. <legend>Contact Form</legend>
  40. <label for="name">Name:</label>
  41. <input type="text" id="name" name="name" placeholder="Enter your name" required>
  42. <label for="email">Email:</label>
  43. <input type="email" id="email" name="email" placeholder="Enter your email" required>
  44. <label for="message">Message:</label>
  45. <textarea id="message" name="message" placeholder="Enter your message" required></textarea>
  46. <input type="submit" value="Submit">
  47. </fieldset>
  48. </form>
  49. </body>
  50. </html>
  51.  
Tags: form
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement