CSS colors

Unique beauty

CSS colors: 

 The color CSS property sets the foreground color value of an element's text and text decorations, and sets the current color value. 

What are the 16 colors in CSS:

HTML used to recognize 16 color names ("black", "white", "gray", "silver", "maroon", "red", "purple", "fushsia", "green", "lime", "olive", "yellow", "navy", "blue", "teal", and "aqua"),

⇒What is syntax for color in CSS:

*<named-color> (such as blue or pink ), <system-color> , and current color .

➡CSS colors Example:

<!DOCTYPE html>
<html>
<head>
    <title>
        CSS color-name property
    </title>
    //Below is an example of Internal CSS
    <style>
        h1 {
            color: black;
        }
        p {
            font-size: 20px;
            color: green;
        }
        .gc1 {
            font-size: 20px;
            color: red;
        }
        .gc2 {
            font-size: 20px;
            color: blue;
        }
    </style>
</head>
 
<body>
    <h1>
        CSS Color Property
    </h1>
 
    <p>
        Gocources: Is a online course 
    </p>
 
    <p class="gc1">
        Gocources: Is a online course 
    </p>
 
    <p class="gc2">
       Gocources: Is a online course 
    </p>
</body>
</html> 

Output:

CSS colors property 

Gocources: Is a online course 
Gocources:Is a online course
Gocources:Is a online course 







Our website uses cookies to enhance your experience. Learn More
Accept !

GocourseAI

close
send