Changing Text Color

<!DOCTYPE html>
<html>
<head>
  <style>
h1 {
  color: blue; /* Changes heading text color */
}
p {
  color: green; /* Changes paragraph text color */
}
</style> </head> <body> <h1>Hello CSS</h1> <p>This is a CSS color example.</p> </body> </html>

Explanation:

  • color property sets the text color.
  • Headings will appear blue, and paragraphs green.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *