How to change a Font color in HTML
In this tutorial, we are going to learn about how to change a font color in html by using the css style attribute.
Changing the font color
To change the font color in html, we can use the css
style attribute followed by the css property
Here is an example, that changes the
<p> element font color to
<p style="color:red;">This is red color</p>
<h1 style="color:green;">This is green color</h1>
Note: By using the css
styleattribute inside the html element, previous applied styles to that element are removed.