Complete the code to select only direct child <p> elements of a <div>.
div [1] p { color: blue; }The > symbol selects direct children only, so div > p targets
elements that are immediate children of a
Complete the code to color direct child <li> elements of a <ul> red.
ul [1] li { color: red; }The > selector targets only direct children, so ul > li colors only
- .
Fix the error in the selector to style only direct child <span> elements inside a <section>.
section [1] span { font-weight: bold; }The > selector ensures only direct child elements inside
Fill both blanks to select direct child <h2> elements inside <article> and color them green.
article [1] h2 { color: [2]; }
The > selects direct children, and green colors the text green.
Fill all three blanks to select direct child <a> elements inside <nav>, set text decoration to none, and color to blue.
nav [1] a { text-decoration: [2]; color: [3]; }
The > selects direct children, none removes underline, and blue colors the links blue.