0

A problem with DOM

I am wondering if the nodechild is indentified by sequence or by default , here is the exaple for my question : by sequence , when : <div> <p></p> <div> ==> because <p> is inside <div> , so <p> is child of <div>???? OR by default : <p> by default is child of <div>??/? Please help me with a clearly explanation :D thank you

23rd Feb 2017, 3:24 PM
Thành Long
Thành Long - avatar
1 Odpowiedź
+ 2
<div> <p></p> <div> ==> because <p> is inside <div> , so <p> is child of <div> Is the correct answer. The tags inside a tag are the children, no matter what the tags are.
23rd Feb 2017, 3:37 PM
Marco Bimbati
Marco Bimbati - avatar