CSS – Set Text Color for Paragraph
To set text or font color for paragraph element using CSS, set color property of the paragraph with required CSS Color Value.
Example
</>
Copy
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
#p1 {
color: red;
}
#p2 {
color: #009a99;
}
</style>
</head>
<body>
<p>A default paragraph.</p>
<p id="p1">A paragraph with colored text.</p>
<p id="p2">A paragraph with colored text using CSS Hex Color.</p>
</body>
</html>
Conclusion
In this CSS Tutorial, we learned how to set font color for paragraph element(s) using CSS.