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 Selecting DOM Elements!
You have completed Practice Selecting DOM Elements!
Preview
This video covers one solution to the challenge.
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
then try to recreate it yourself.
0:00
So first step,
to select the element with the ID
0:00
about I used document.getElementById.
0:05
Remember, document or the document object,
is what we can use to select and
0:09
control elements of
the currently loaded webpage.
0:14
So I used the getElementById
method on the document object,
0:16
passed it the string about.
0:22
Which returns the div element with the ID
about and assigning that to the about
0:24
variable or constant applies the 2
pixel solid firebrick order styles.
0:29
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