Change CSS button text color
This article is about how to change the color of button text in CSS.
What is a button?
We can create button using <button > or <input> tag in HTML. When we click a button with a link we go to another webpage or website. If you want to perform some action, you need to create a button. It is mainly used to get some value, for ex submit button is used to submit the information to a server.
How to create a simple button
<input type="button" value="click here">
In the above code, the first button is created using the <button> tag and another button is created using the <input> tag. see the above output the two buttons are created with the same style.
How to change the button text color
Output: In the above code, We have changed the color of the button text using the CSS color property. We have given the value ‘blue’ using the color property in the inline style, so the button text color has changed to blue in the output.
<input style="color:red" type="button" >
Use the CSS color property to change the color of a button as in the above code. Input tag has inline style i.e style attribute and set the color to red, So the output will be displayed in the red button text. You can use font-family property to change the button font style.