DOM и события(JS) (Второй урок) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

DOM и события(JS) (Второй урок)

body имеет детей h1 и a. Тогда почему на вопрос следующий после этого утверждения: "Кто является родителем для h1" Ответ не body? Это не вопрос, а утверждение об ОШИБКЕ В ВАШЕМ ОТВЕТЕ, ЛИБО В предыдущей ТЕОРЕТИЧЕСКОЙ постановке к нему!

10th Apr 2019, 5:34 AM
Rota
3 Answers
+ 6
Ahh !! Try to understand Rota !! DOM tree will look like this : Body - p - h1 Only tags which r directly nested in body are its direct child. others are not..
10th Apr 2019, 6:49 AM
Arushi Singhania
Arushi Singhania - avatar
+ 5
If u will look at that question, u will find that h1 is nested in p which is nested in body tag. Hence, p is parent of h1 and body is parent of p and grandparent of h1.
10th Apr 2019, 6:15 AM
Arushi Singhania
Arushi Singhania - avatar
0
Нет, я смотрю на постановку пункта, где h1 и a вдруг стали детьми body, он не корректен, не компетентен в данном задании.
10th Apr 2019, 6:34 AM
Rota