WD 18. CSSColor&Properties
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Colors in CSS</title>
<style>
#firstPara{
color: blueviolet; /* color by name */
background-color: aqua;
}
#secondPara{
color: rgb(223, 130, 54); /* Color by rgb value */
background-color: rgb(54, 130, 223);
}
#thirdPara{
color: #132ec7; /* Color by hex value */
background-color: #12ac43;
}
</style>
</head>
<body>
<h2>This is my fisrt box</h2>
<p id="firstPara">This is a paragraph from first box</p>
<h2>This is my fisrt box</h2>
<p id="secondPara">This is a paragraph from second box</p>
<h2>This is my fisrt box</h2>
<p id="thirdPara">This is a paragraph from third box</p>
</body>
</html>
#Output:
Comments
Post a Comment