css

Change font color CSS

The color property can be used to change the color of fonts using CSS. You can pass a value to it in HEX or RGB format

.element {
    color: #ff0000;
}

You can pass value to color property in RGB format also like below example

.element {
    color: rgb(0,0,0);
}

.element {
    color: rgba(0,0,0,0.7);
}
Was this helpful?