Skip to content

Commit

Permalink
Update basic.mdx
Browse files Browse the repository at this point in the history
Update Some Important Selectors Tags that are used in CSS.
  • Loading branch information
Fuzaildev authored Oct 24, 2023
1 parent a11256b commit f3da6c1
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions content/batch/learn/css/basic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,38 @@ h1 {
color: green;
}

Add More important Selectors tags that really used.
Essential Selectors Tag that Really used.

/* Child Selector (using > ) */
div>p {
background-color: green;
}

/* Descendant Selector */

.div p {
background-color: maroon;
}

/* Universal Selector (ALL Elements margin and padding are 0; ) */

{
margin: 0;
padding: 0;
}
/* Pseudo Selector */

/* If you visited the website then you can change the color */
a:visited {
color: red;
}

/* If you want to change link color before visit */
a:link {
color: blueviolet;
}

/* Specificity example */
.heading#title {
color: yellow;
Expand Down

0 comments on commit f3da6c1

Please sign in to comment.