try the following:
add two divs to a page with the same class name.
add two elements within each div: for argument’s sake paragraphs.
make the text color of the first paragraph of each div red.
why can’t i figure out how to do this relatively simple task without having to use id’s?
You can do it like this in jQuery (
:first-childselector):But CSS will do it as well (CSS
:first-childselector), and you should use this route if possible 🙂