Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDaven Hietala
8,040 PointsWhat is the top-most element in an HTML document called
What is the top-most element in an HTML document called?
I thought it would be called the ":first-child" or ":root". But according to the quiz I am taking this is not the case. I reviewed the video that was offered to review and still did not find the answer.
Please help
2 Answers
KRIS NIKOLAISEN
54,972 PointsClick on :root - MDN in the teacher's notes of the linked video for:
In HTML, :root represents the <html> element and is identical to the selector html, except that its specificity is higher.
/* Selects the root element of the document: <html> in the case of HTML */
Daven Hietala
8,040 PointsThank you Kris!
I clicked on the link to read through the MDN document and still did not see my answer for a while. I felt like it was telling me the same thing I already tried, ":root".
I didn't think the <html> tag would be considered the HTML element as well.
Anyways, I appreciate your time and showing me "how to find the answer on my own" vs. just telling me out right. Teach fish vs. give fish.
Have a nice day!