How to change button color in CSS?

The default HTML button doesn’t look good because of poor styling and dull background color.

However, you can easily get rid of the default button styling and color.

To change the color of a button, we use the background-color property.

Here is a working example:


   background-color: red;


  • Manoj Kumar

    Hi, My name is Manoj Kumar. I am a full-stack developer with a passion for creating robust and efficient web applications. I have hands-on experience with a diverse set of technologies, including but not limited to HTML, CSS, JavaScript, TypeScript, Angular, Node.js, Express, React, and MongoDB.

    View all posts