File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
6+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
7+ < title > Selectors in CSS</ title >
8+ < style >
9+ /* Element Selector */
10+ p {
11+ border : 2px solid red
12+ }
13+ /* Id Selector */
14+ # firstpara {
15+ color : pink;
16+ }
17+ /* Class Selector */
18+ .firstclass {
19+ color : yellow;
20+ }
21+ /* Grouping Selector */
22+ footer , span {
23+ background-color : skyblue;
24+ }
25+
26+ </ style >
27+ </ head >
28+ < body >
29+ < h1 > Selectors </ h1 >
30+ < p id ="firstpara "> This is simple paragraph</ p >
31+ < p id ="secondpara " class ="firstclass "> This is another paragraph</ p >
32+ < div >
33+
34+ < p > This is yet another simple paragraph</ p >
35+ < span > This is Span</ span >
36+ </ div >
37+ < footer > This is Footer</ footer >
38+ </ body >
39+ </ html >
You can’t perform that action at this time.
0 commit comments