How to change font color in HTML?
There are ways to change font color using CSS to HTML file.
1. Inline CSS: using "style" Attribute.
<p style="color: red; font-size: 16px;">This is a paragraph with inline CSS.</p>
2. Internal CSS: CSS rules within a <style> element in the <head> section of your HTML.
<style>
p {
color: blue;
}
</style>
3. External CSS: Using "<link>" element an external css file linked to the HTML file.
<link rel="stylesheet" href="styles.css">
<!-- styles.css -->
p {
color: green;
}