Child Selectors
Child Selectors
You have seen descendant selectors. There is one more type of selectors which is very similar to descendants but have different functionality. Consider the following example:
body > p {
color: #000000;
}
This rule will render all the paragraphs in black if they are direct child of <body> element. Other paragraphs put inside other elements like <div> or <td> etc. would not have any
effect of this rule.