How to set the color of a text with CSS


To set the color of a text, use the color property.

Example

You can try to run the following code to learn how to work with the color property in CSS:

<html>
   <head>
   </head>
   <body>
      <p style = "color:blue;">
         ANTARTICA is a continent
      </p>
   </body>
</html>

Updated on: 30-Jan-2020

136 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements