Colors in CSS

 <!DOCTYPE html>

<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>CSS Colors</title>
    <link rel="stylesheet" href="CSS/styleFour.css">
</head>

<body>
    <h2>This is my first box</h2>
    <p id="firstPara">This is a paragraph from first box</p>

    <h2>This is my second box</h2>
    <p id="secondPara">This is a paragraph from second box</p>

    <h2>This is my third box</h2>
    <p id="thirdPara">This is a paragraph from third box</p>
</body>

</html>





CSS File
#firstPara {
    color: blueviolet;
    /* Color by name */
}

#secondPara {
    color: rgb(223, 130, 54);
    /* Color by rgb value */
}

#thirdPara {
    color: #ffffff;
    /* Color by hex value */
    background-color: rgb(34, 34, 34);
}



Comments