definition of child element and parent element i don't understand | Sololearn: Learn to code for FREE!

+1

definition of child element and parent element i don't understand

10/16/2016 10:27:32 AM

Vishal Sharma

1 Answer

New Answer

+3

¿Remember the graphical representation of the DOM of a web page? It's like a represantion of a genealogical tree. Whatever is behind a node are children of that node and whatever is over a node is the parent of a node, beeing the <html> the big granpa of all elements without any parent ;-) For example, <html> <body> <p>Hi.. I'm a child of body, and body is a child of html... Body is my parent... html could be my granpa but I don't have to worry about that as there is not granpa function selection neither a granson selection or whatever..</p> <p>Hi there... I 'm also a body's child and a sibling of the previous p element.. by the way.. I don't have children neither my brother</p> </body> </html>