Skip to content

Commit f76e24c

Browse files
codewithmayank
1 parent e4cf954 commit f76e24c

File tree

3 files changed

+95
-0
lines changed

3 files changed

+95
-0
lines changed

Diff for: 0.5.Selector CSS/index.html

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Selector in css</title>
7+
<style>
8+
* {
9+
/* It is used for universal selector */
10+
}
11+
12+
h1 {
13+
color: rgb(0, 0, 0);
14+
text-transform: capitalize;
15+
}
16+
17+
p {
18+
text-transform: uppercase;
19+
color: red;
20+
}
21+
22+
h2 p {
23+
text-align: center;
24+
color: rgb(255, 34, 0);
25+
}
26+
</style>
27+
</head>
28+
29+
<body>
30+
<!--
31+
Selector CSS
32+
-->
33+
34+
<!-- Block css -->
35+
<div id="id_css"></div>
36+
<div class="class_css"></div>
37+
38+
<!-- name selector -->
39+
<h1>welcome</h1>
40+
<p>
41+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolor accusamus
42+
itaque laudantium nihil fugiat est eligendi nulla aliquam distinctio
43+
cupiditate.
44+
</p>
45+
46+
<!-- CSS Grouping Selector -->
47+
<h2>welcome</h2>
48+
<p>
49+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolor accusamus
50+
itaque laudantium nihil fugiat est eligendi nulla aliquam distinctio
51+
cupiditate.
52+
</p>
53+
54+
<!-- A CSS selector can contain more than one simple selector. Between the simple selectors, we can include a combinator.
55+
56+
There are four different combinators in CSS:
57+
58+
descendant selector (space)
59+
child selector (>)
60+
adjacent sibling selector (+)
61+
general sibling selector (~) -->
62+
63+
64+
</body>
65+
</html>

Diff for: 0.5.Selector CSS/readme.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!--
2+
. : class selector
3+
# : id selectors
4+
* : universal selector
5+
h1 : tagname selector
6+
CSS Grouping Selector
7+
-->
8+
9+
##CSS Selectors
10+
--
11+
A CSS selector selects the HTML element(s) you want to style.
12+
13+
CSS Selectors
14+
15+
CSS selectors are used to "find" (or select) the HTML elements you want to style.
16+
17+
We can divide CSS selectors into five categories:
18+
19+
Simple selectors (select elements based on name, id, class)
20+
21+
Combinator selectors (select elements based on a specific relationship between them)
22+
23+
Pseudo-class selectors (select elements based on a certain state)
24+
25+
Pseudo-elements selectors (select and style a part of an element)
26+
27+
Attribute selectors (select elements based on an attribute or attribute value)
28+
29+
This page will explain the most basic CSS selectors.

Diff for: 01.Backgound_property/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<li>About</li>
2222
</ul>
2323
</nav>
24+
2425
<div class="box2">
2526
<img src="/img/car-1.png" alt="" width="200px" height="200px" />
2627
<h1>Car1</h1>

0 commit comments

Comments
 (0)