p {
color: #FFF;
background: #0099da;
}
This is Basic Syntax of CSS
.my_text{
color:#0099da;
font-weight:bold;
font-size:20px;
}
#my_text{
color:#0099da;
font-weight:bold;
font-size:20px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Child Selectors</title>
</head>
<style type="text/css">
.my_text > p{
color:#000;
font-weight:bold;
font-size:20px;
}
</style>
<body>
<div class="my_text">
<p>This is Child Selectors Program</p>
</div>
</body>
</html>
This is Child Selectors Program
<!DOCTYPE html>
<html>
<head>
<title>Grouping Selectors</title>
</head>
<style type="text/css">
#main_1, #main_2, #main_3 {
width:80px;
height:50px;
margin:0px 5px;
text-align:center;
font-size:26px;
border:1px solid #000;
color:#0099da;
float:left;
font-weight:bold;
}
</style>
<body>
<div id="main_1">Box-1</div>
<div id="main_2">Box-2</div>
<div id="main_3">Box-3</div>
</body>
</html>