Answers for "CSS Selectors CheatSheet"

CSS
6

css cheat sheet

Best CSS cheat Sheet:
https://htmlcheatsheet.com/css/
Posted by: Guest on January-04-2021
3

CSS Selectors CheatSheet

.class {
  /* Selects all elements with class = "class" */
}

#id {
  /* Selects all elements with id = "class" */
}

p {
  /* Selects all p elements */
}

p.class {
  /* Selects all p elements with class = "class" */
}

h1, p {
  /* Selects all h1 elements and p elements */
}

h1 p {
    /* Selects all p elements inside h1 elements */
}

h1 > p {
    /* Selects all p elements whose parent is a h1 element */
}

h1 + p {
    /* Selects all p elements immediately after h1 elements */
}

h1 ~ p {
    /* Selects every p element preceded by a h1 element */
}
Posted by: Guest on October-26-2020
3

css cheat sheet

The best css cheat sheet - https://htmlcheatsheet.com/css/
Posted by: Guest on September-27-2020

Browse Popular Code Answers by Language