Last Updated: 21-Nov-2021


CSS Selectors


HTML code


<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>CSS course</title>
	<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
	    <div class="header">እዚ ኣርእስቲ'ዩ1</div>
	    <p class="header">እዚ ኣርእስቲ'ዩ2</p>
        <p class="para eyu">እዚኣ ፓራግራፍ ኢያ።</p>
        <p id="mefth">እዚኣ ፓራግራፍ ኢያ።</p>
        <div class="mefth">እዚኣ ፓራግራፍ ኢያ።</div>
</body>
</html>

CSS Selectors Code


body{
	
}
div{

}
h1{

}
h2{

}

*{
	background-color: green;
	color: red;
	font-weight: bold;
	font-size: 23px;	
}
.para, .eyu{
 color: yellow;

}
div.header{
	background-color: white;
	color: green;
}
p.header{
	background-color: white;
	color: red;
}
#mefth{
	color: blue;
	text-align: center;
	text-decoration: underline;
}
p,h1,h2,.mefth,.header,.para,.eyu, body{
	color: red;
}
/*
*  Selector ኢዩ፡
background-color ከኣ property ኢዩ።
green ከኣ value ኢዩ።
*/

/*
p.header  Selectors ኢዮም፡
color ከኣ property ኢዩ።
blue ከኣ value ኢዩ።
*/

The Result of the above Code is:

CSS Selectors

In Tigrinya Language (ብትግርኛ)



Share this page           

We've Recommended Articles for you