SherinKR

Button

Oct 15th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <style>
  5. .button {
  6. background-color: #4CAF50; /* Green */
  7. border: none;
  8. color: white;
  9. padding: 15px 32px;
  10. text-align: center;
  11. text-decoration: none;
  12. display: inline-block;
  13. font-size: 16px;
  14. margin: 4px 2px;
  15. cursor: pointer;
  16. }
  17.  
  18. .button2 {background-color: #008CBA;} /* Blue */
  19. .button3 {background-color: #f44336;} /* Red */
  20. .button4 {background-color: #e7e7e7; color: black;} /* Gray */
  21. .button5 {background-color: #555555;} /* Black */
  22. </style>
  23. </head>
  24. <body>
  25.  
  26. <h2>Button Colors</h2>
  27. <p>Change the background color of a button with the background-color property:</p>
  28.  
  29. <button class="button">Green</button>
  30. <button class="button button2">Blue</button>
  31. <button class="button button3">Red</button>
  32. <button class="button button4">Gray</button>
  33. <button class="button button5">Black</button>
  34.  
  35. </body>
  36. </html>
Add Comment
Please, Sign In to add comment