Exercise:
Add a red color to all previous sibling elements of <h2>.
Hint: Use the prevAll() method.
Edit This Code:
See Result »
div (parent)
p
span
h2
h3
p
Result:
Show Answer
Correct Code:
div (parent)
p
span
h2
h3
p
Correct Result:
Hide Answer