@charset "UTF-8";

/* ① 子孫セレクタ */
/* sectionの中にあるすべてのp */
.descendant p {
    color: red;
}

/* ② 直下セレクタ */
/* sectionの直下にあるpだけ */
.child > p {
    color: blue;
}

/* ③ 隣接セレクタ */
/* h2のすぐ後ろにあるpだけ */
.adjacent h2 + p {
    color: green;
}

/* ④ 間接セレクタ */
/* h2より後ろにあるpをすべて */
.general h2 ~ p {
    color: orange;
}