Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Practice Traversing the DOM!
You have completed Practice Traversing the DOM!
Preview
This video covers one solution to the practice session.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
compare it to what you wrote, and
ten try to recreate it yourself.
0:00
The goal was to get your page to
look like this using DOM traversal.
0:01
So now I'll show you one
solution to this exercise,
0:04
you can also reference my code when
you download the project files.
0:08
First, to target the first
child of the unordered list,
0:11
I used the first element
child property on list,
0:18
which gives you the first child element.
0:22
Then to select the second list item I
referenced the first item variable, then
0:26
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up